{"record":{"id":"181856241522f9de","repo":"ytdl-org/youtube-dl","slug":"unable-to-find-feed-id","errorCode":null,"errorMessage":"Unable to find feed id","messagePattern":"Unable to find feed id","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/theplatform.py","lineNumber":271,"sourceCode":"        qs_dict = compat_parse_qs(compat_urllib_parse_urlparse(url).query)\n        if 'guid' in qs_dict:\n            webpage = self._download_webpage(url, video_id)\n            scripts = re.findall(r'<script[^>]+src=\"([^\"]+)\"', webpage)\n            feed_id = None\n            # feed id usually locates in the last script.\n            # Seems there's no pattern for the interested script filename, so\n            # I try one by one\n            for script in reversed(scripts):\n                feed_script = self._download_webpage(\n                    self._proto_relative_url(script, 'http:'),\n                    video_id, 'Downloading feed script')\n                feed_id = self._search_regex(\n                    r'defaultFeedId\\s*:\\s*\"([^\"]+)\"', feed_script,\n                    'default feed id', default=None)\n                if feed_id is not None:\n                    break\n            if feed_id is None:\n                raise ExtractorError('Unable to find feed id')\n            return self.url_result('http://feed.theplatform.com/f/%s/%s?byGuid=%s' % (\n                provider_id, feed_id, qs_dict['guid'][0]))\n\n        if smuggled_data.get('force_smil_url', False):\n            smil_url = url\n        # Explicitly specified SMIL (see https://github.com/ytdl-org/youtube-dl/issues/7385)\n        elif '/guid/' in url:\n            headers = {}\n            source_url = smuggled_data.get('source_url')\n            if source_url:\n                headers['Referer'] = source_url\n            request = sanitized_Request(url, headers=headers)\n            webpage = self._download_webpage(request, video_id)\n            smil_url = self._search_regex(\n                r'<link[^>]+href=([\"\\'])(?P<url>.+?)\\1[^>]+type=[\"\\']application/smil\\+xml',\n                webpage, 'smil url', group='url')\n            path = self._search_regex(\n                r'link\\.theplatform\\.com/s/((?:[^/?#&]+/)+[^/?#&]+)', smil_url, 'path')","sourceCodeStart":253,"sourceCodeEnd":289,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/theplatform.py#L253-L289","documentation":"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).","triggerScenarios":"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.","commonSituations":"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.","solutions":["Update to yt-dlp, which has newer theplatform/feed handling than legacy youtube-dl","Find the current feed id by opening the embedding page, searching devtools sources for 'defaultFeedId', and constructing the feed URL manually","Pass a direct SMIL or media URL instead of the guid page when available","If you maintain the extractor, extend the regex to cover the new pattern (e.g. different quoting or variable name)"],"exampleFix":"// before: regex only matches double-quoted defaultFeedId\nfeed_id = self._search_regex(r'defaultFeed\\s*:\\s*\"([^\"]+)\"', feed_script, 'default feed id', default=None)\n// after: tolerate single quotes and whitespace variants\nfeed_id = self._search_regex(r'defaultFeedId\\s*:\\s*[\"\\']([\"\\']+)[\"\\']', feed_script, 'default feed id', default=None)","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    ydl.extract_info(guid_url)\nexcept ExtractorError as e:\n    if 'Unable to find feed id' in str(e):\n        # fall back: fetch the embedding page, grep defaultFeedId manually, build feed URL\n        feed = build_feed_url(manual_feed_id())","preventionTips":["Prefer direct media/SMIL URLs over guid pages when you can obtain them","Pin a recent yt-dlp version since thePlatform site markup drifts","When scraping yourself, search page scripts for 'defaultFeedId' before calling the extractor"],"tags":["extractor","theplatform","regex","site-change"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}