ytdl-org/youtube-dl · error · ExtractorError

%s said: %s

Error message

%s said: %s

What it means

SinaIE._real_extract, when the URL has no direct video id, downloads the pseudo-id page and looks for an element with class 'errtitle'. If found, its cleaned text is raised as '<Sina> said: <message>' (expected). Sina embeds human-readable errors (e.g. 'The video has been deleted' in Chinese) directly in the error page instead of returning a distinct HTTP status.

Source

Thrown at youtube_dl/extractor/sina.py:74

    ]

    def _real_extract(self, url):
        mobj = re.match(self._VALID_URL, url)

        video_id = mobj.group('video_id')
        if not video_id:
            if mobj.group('token') is not None:
                # The video id is in the redirected url
                self.to_screen('Getting video id')
                request = HEADRequest(url)
                _, urlh = self._download_webpage_handle(request, 'NA', False)
                return self._real_extract(urlh.geturl())
            else:
                pseudo_id = mobj.group('pseudo_id')
                webpage = self._download_webpage(url, pseudo_id)
                error = get_element_by_attribute('class', 'errtitle', webpage)
                if error:
                    raise ExtractorError('%s said: %s' % (
                        self.IE_NAME, clean_html(error)), expected=True)
                video_id = self._search_regex(
                    r"video_id\s*:\s*'(\d+)'", webpage, 'video id')

        video_data = self._download_json(
            'http://s.video.sina.com.cn/video/h5play',
            video_id, query={'video_id': video_id})
        if video_data['code'] != 1:
            raise ExtractorError('%s said: %s' % (
                self.IE_NAME, video_data['message']), expected=True)
        else:
            video_data = video_data['data']
            title = video_data['title']
            description = video_data.get('description')
            if description:
                description = description.strip()

            preference = qualities(['cif', 'sd', 'hd', 'fhd', 'ffd'])

View on GitHub (pinned to 956b8c5855)

Solutions

  1. Read the message after 'Sina said:' - it is the site's own deletion/reason text (translate if Chinese).
  2. Search Sina video or the original article for a re-uploaded copy and use its new URL.
  3. Try the Archive.org Wayback Machine for the page to at least recover metadata.
  4. Update to yt-dlp in case Sina's page structure changed and the extractor now misreads normal pages as errors.
Defensive patterns

Strategy: try-catch

Try / catch

try:
    extract(url)
except ExtractorError as e:
    if e.expected and 'said:' in str(e):
        archive_or_drop(url, str(e))
    else:
        raise

Prevention

When it happens

Trigger: Extracting a video.sina.com.cn URL with only a pseudo_id where the served HTML contains <... class="errtitle">...</...>. Produced when the video was deleted, is under review, or the pseudo-id no longer maps to a video.

Common situations: Old blog/news article embeds whose Sina videos were removed (very common for pre-2015 content); censorship takedowns; links where the numeric suffix was copied incorrectly; Weibo cross-posts pointing at removed Sina assets.

Related errors


AI-assisted analysis of ytdl-org/youtube-dl@956b8c5855 (2026-08-14). Data as JSON: /api/errors/133d50ede65b1a47. Report an issue: GitHub.