ytdl-org/youtube-dl · error · ExtractorError

Unable to find feed id

Error message

Unable to find feed id

What it means

Raised by ThePlatformFeedIE when none of the page's scripts contain the 'defaultFeedId' assignment needed to build the feed URL for a guid-based link. The extractor iterates candidate scripts in reverse looking for defaultFeedId: "..."; if every script misses it, extraction cannot proceed and this generic error is thrown (not marked expected).

Source

Thrown at youtube_dl/extractor/theplatform.py:271

        qs_dict = compat_parse_qs(compat_urllib_parse_urlparse(url).query)
        if 'guid' in qs_dict:
            webpage = self._download_webpage(url, video_id)
            scripts = re.findall(r'<script[^>]+src="([^"]+)"', webpage)
            feed_id = None
            # feed id usually locates in the last script.
            # Seems there's no pattern for the interested script filename, so
            # I try one by one
            for script in reversed(scripts):
                feed_script = self._download_webpage(
                    self._proto_relative_url(script, 'http:'),
                    video_id, 'Downloading feed script')
                feed_id = self._search_regex(
                    r'defaultFeedId\s*:\s*"([^"]+)"', feed_script,
                    'default feed id', default=None)
                if feed_id is not None:
                    break
            if feed_id is None:
                raise ExtractorError('Unable to find feed id')
            return self.url_result('http://feed.theplatform.com/f/%s/%s?byGuid=%s' % (
                provider_id, feed_id, qs_dict['guid'][0]))

        if smuggled_data.get('force_smil_url', False):
            smil_url = url
        # Explicitly specified SMIL (see https://github.com/ytdl-org/youtube-dl/issues/7385)
        elif '/guid/' in url:
            headers = {}
            source_url = smuggled_data.get('source_url')
            if source_url:
                headers['Referer'] = source_url
            request = sanitized_Request(url, headers=headers)
            webpage = self._download_webpage(request, video_id)
            smil_url = self._search_regex(
                r'<link[^>]+href=(["\'])(?P<url>.+?)\1[^>]+type=["\']application/smil\+xml',
                webpage, 'smil url', group='url')
            path = self._search_regex(
                r'link\.theplatform\.com/s/((?:[^/?#&]+/)+[^/?#&]+)', smil_url, 'path')

View on GitHub (pinned to 956b8c5855)

Solutions

  1. Update to yt-dlp, which has newer theplatform/feed handling than legacy youtube-dl
  2. Find the current feed id by opening the embedding page, searching devtools sources for 'defaultFeedId', and constructing the feed URL manually
  3. Pass a direct SMIL or media URL instead of the guid page when available
  4. If you maintain the extractor, extend the regex to cover the new pattern (e.g. different quoting or variable name)

Example fix

// before: regex only matches double-quoted defaultFeedId
feed_id = self._search_regex(r'defaultFeed\s*:\s*"([^"]+)"', feed_script, 'default feed id', default=None)
// after: tolerate single quotes and whitespace variants
feed_id = self._search_regex(r'defaultFeedId\s*:\s*["\'](["\']+)["\']', feed_script, 'default feed id', default=None)
Defensive patterns

Strategy: fallback

Try / catch

try:
    ydl.extract_info(guid_url)
except ExtractorError as e:
    if 'Unable to find feed id' in str(e):
        # fall back: fetch the embedding page, grep defaultFeedId manually, build feed URL
        feed = build_feed_url(manual_feed_id())

Prevention

When it happens

Trigger: Extracting a theplatform guid URL (e.g. .../guid/xxxx) from an embedding page whose JS bundle no longer contains a literal 'defaultFeedId\s*:\s*"[^"]+"' pattern — minified, renamed, or moved into a data attribute.

Common situations: Site redesigns that rename defaultFeedId or load it dynamically; the embedding page URL used to discover scripts changed; youtube-dl version predates the current site markup, so switching to yt-dlp resolves many instances.

Related errors


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