ytdl-org/youtube-dl · error · ExtractorError

no video on the webpage

Error message

no video on the webpage

What it means

Raised by the USA Today extractor when the AJAX-fetched article page (?ajax=true) contains no element with class 'ui-video-data'. That element is the sole source of the Brightcove asset metadata, so its absence means the URL has no embedded video reachable via this path. Marked expected=True, i.e. a content condition, not a downloader bug.

Source

Thrown at youtube_dl/extractor/usatoday.py:50

        'url': 'https://www.usatoday.com/story/tech/science/2018/08/21/yellowstone-supervolcano-eruption-stop-worrying-its-blow/973633002/',
        'info_dict': {
            'id': '5824495846001',
            'ext': 'mp4',
            'title': 'Yellowstone more likely to crack rather than explode',
            'timestamp': 1534790612,
            'description': 'md5:3715e7927639a4f16b474e9391687c62',
            'uploader_id': '28911775001',
            'upload_date': '20180820',
        }
    }]
    BRIGHTCOVE_URL_TEMPLATE = 'http://players.brightcove.net/%s/default_default/index.html?videoId=%s'

    def _real_extract(self, url):
        display_id = self._match_id(url)
        webpage = self._download_webpage(update_url_query(url, {'ajax': 'true'}), display_id)
        ui_video_data = get_element_by_attribute('class', 'ui-video-data', webpage)
        if not ui_video_data:
            raise ExtractorError('no video on the webpage', expected=True)
        video_data = self._parse_json(ui_video_data, display_id)
        item = try_get(video_data, lambda x: x['asset_metadata']['items'], dict) or {}

        return {
            '_type': 'url_transparent',
            'url': self.BRIGHTCOVE_URL_TEMPLATE % (item.get('brightcoveaccount', '29906170001'), item.get('brightcoveid') or video_data['brightcove_id']),
            'id': compat_str(video_data['id']),
            'title': video_data['title'],
            'thumbnail': video_data.get('thumbnail'),
            'description': video_data.get('description'),
            'duration': parse_duration(video_data.get('length')),
            'ie_key': 'BrightcoveNew',
        }

View on GitHub (pinned to 956b8c5855)

Solutions

  1. Confirm the URL is an actual video article — open it in a browser and check a video player is present.
  2. If a player exists, inspect the page source for the new container class and update get_element_by_attribute arguments in the extractor.
  3. If the video is embedded differently (generic iframe/Brightcove), use the generic extractor or the BrightcoveNew extractor directly with the account/video ids.
  4. Treat this as expected: skip the URL in batch jobs instead of aborting the run.
Defensive patterns

Strategy: validation

Validate before calling

from youtube_dl.utils import get_element_by_attribute
webpage = ydl.urlopen(url + '?ajax=true').read().decode()
if get_element_by_attribute('class', 'ui-video-data', webpage) is None:
    skip(url, 'no embedded video on page')  # avoid raising into the extractor

Try / catch

try:
    ydl.extract_info(url)
except ExtractorError as e:
    if e.expected and 'no video on the webpage' in str(e):
        continue  # content condition, skip URL
    raise

Prevention

When it happens

Trigger: Calling the extractor on a USA Today article URL (photo galleries, live blogs, plain text articles) that embeds its video through a different player or not at all; get_element_by_attribute('class', 'ui-video-data', webpage) returns None.

Common situations: Users pass a section/index URL instead of a video article; template changes rename the ui-video-data class; videos moved to a different CDN widget so the metadata div is dropped.

Related errors


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