DIYgod/RSSHub · error · Error

Unknown video type: ${dataType}

Error message

Unknown video type: ${dataType}

What it means

Error "Unknown video type: ${dataType}" thrown in DIYgod/RSSHub.

Source

Thrown at lib/routes/pikabu/utils.ts:35

const fixVideo = (element) => {
    const preview = element
        .find('.player__preview')
        .attr('style')
        .match(/url\((.+)\);/)[1];
    const dataType = element.attr('data-type');
    let videoHtml: string;

    if (dataType === 'video') {
        const videoId = element.attr('data-source').match(/\/embed\/(.+)$/)[1];
        videoHtml = renderVideo({ videoId });
    } else if (dataType === 'video-file') {
        const width = element.find('.player__svg-stretch').attr('width');
        const mp4 = `${element.attr('data-source')}.mp4`;
        const webm = element.attr('data-webm');
        videoHtml = renderVideo({ preview, width, mp4, webm });
    } else {
        throw new Error(`Unknown video type: ${dataType}`);
    }
    element.replaceWith(videoHtml);
};

export { baseUrl, fixImage, fixVideo };

View on GitHub (pinned to bed535e087)

Solutions

  1. The source returned a video data type this route does not handle; open an issue with the item URL.

When it happens

Trigger: A Pikabu item contains a video data type that is not recognized by the parser.

Common situations: See trigger scenarios.


AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12). Data as JSON: /api/errors/6d61051e44a12314. Report an issue: GitHub.