ytdl-org/youtube-dl · error · ExtractorError

No episodes found

Error message

No episodes found

What it means

Raised by YoukuShowIE._extract_entries when the playlist/show HTML returned by the show API does not contain the expected drama-list markup. The code looks for an element with class 'p-drama-grid' or 'p-drama-half-row' via get_element_by_class; if neither is present in playlist_data, it concludes there are no episodes and raises. This means the show page either truly has no listed episodes or Youku changed its playlist HTML structure.

Solutions

  1. Open the show URL in a browser and confirm episodes are actually listed for your region; if none, the error is correct.
  2. Dump the playlist_data HTML (print or log it before the check) and inspect what container class the episodes now use.
  3. Add the new class name to the get_element_by_class fallback chain in _extract_entries, e.g. get_element_by_class('p-drama-<new-class>', playlist_data).
  4. Verify the JSONP transform still yields valid JSON — if .get('html') returns an error page, fix the query params (callback='cb') or endpoint first.

Example fix

// before
drama_list = (get_element_by_class('p-drama-grid', playlist_data)
              or get_element_by_class('p-drama-half-row', playlist_data))

// after
drama_list = (get_element_by_class('p-drama-grid', playlist_data)
              or get_element_by_class('p-drama-half-row', playlist_data)
              or get_element_by_class('p-drama-new-grid', playlist_data))  // class observed in current HTML
Defensive patterns

Strategy: validation

Validate before calling

def has_episode_grid(playlist_html: str) -> bool:
    return ('p-drama-grid' in playlist_html
            or 'p-drama-half-row' in playlist_html)

Try / catch

try:
    entries = ydl.extract_info(show_url)
except ExtractorError as e:
    if 'No episodes found' in str(e):
        # verify manually: page may genuinely be empty or markup changed
        log_and_flag_for_review(show_url)
    else:
        raise

Prevention

When it happens

Trigger: Extracting a Youku show URL (show.youku.com) where the returned html field lacks both 'p-drama-grid' and 'p-drama-half-row' containers — empty/removed shows, region-served fallback pages, or a template change by Youku.

Common situations: Shows taken down or not yet published in the requested region; Youku shipping a new CSS class scheme for episode grids; the JSONP payload (parsed via js_to_json(strip_jsonp(...))) containing an error/placeholder page instead of the drama grid.

Related errors


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

Appendix: source

Thrown at youtube_dl/extractor/youku.py:264

        'url': 'http://list.youku.com/show/id_zefbfbd61237fefbfbdef.html',
        'only_matching': True,
    }, {
        #  Wrong number of reload_id.
        'url': 'http://list.youku.com/show/id_z20eb4acaf5c211e3b2ad.html',
        'only_matching': True,
    }]

    def _extract_entries(self, playlist_data_url, show_id, note, query):
        query['callback'] = 'cb'
        playlist_data = self._download_json(
            playlist_data_url, show_id, query=query, note=note,
            transform_source=lambda s: js_to_json(strip_jsonp(s))).get('html')
        if playlist_data is None:
            return [None, None]
        drama_list = (get_element_by_class('p-drama-grid', playlist_data)
                      or get_element_by_class('p-drama-half-row', playlist_data))
        if drama_list is None:
            raise ExtractorError('No episodes found')
        video_urls = re.findall(r'<a[^>]+href="([^"]+)"', drama_list)
        return playlist_data, [
            self.url_result(self._proto_relative_url(video_url, 'http:'), YoukuIE.ie_key())
            for video_url in video_urls]

    def _real_extract(self, url):
        show_id = self._match_id(url)
        webpage = self._download_webpage(url, show_id)

        entries = []
        page_config = self._parse_json(self._search_regex(
            r'var\s+PageConfig\s*=\s*({.+});', webpage, 'page config'),
            show_id, transform_source=js_to_json)
        first_page, initial_entries = self._extract_entries(
            'http://list.youku.com/show/module', show_id,
            note='Downloading initial playlist data page',
            query={
                'id': page_config['showid'],

View on GitHub (pinned to 956b8c5855)