{"record":{"id":"d4c1f23794ffe66c","repo":"ytdl-org/youtube-dl","slug":"error-description","errorCode":null,"errorMessage":"error['description']","messagePattern":"error\\['description'\\]","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/fox.py","lineNumber":107,"sourceCode":"                    'login', None, json.dumps({\n                        'deviceId': compat_str(uuid.uuid4()),\n                    }).encode())['accessToken']\n\n    def _real_extract(self, url):\n        video_id = self._match_id(url)\n\n        video = self._call_api('vodplayer/' + video_id, video_id)\n\n        title = video['name']\n        release_url = video['url']\n        try:\n            m3u8_url = self._download_json(release_url, video_id)['playURL']\n        except ExtractorError as e:\n            if isinstance(e.cause, compat_HTTPError) and e.cause.code == 403:\n                error = self._parse_json(e.cause.read().decode(), video_id)\n                if error.get('exception') == 'GeoLocationBlocked':\n                    self.raise_geo_restricted(countries=['US'])\n                raise ExtractorError(error['description'], expected=True)\n            raise\n        formats = self._extract_m3u8_formats(\n            m3u8_url, video_id, 'mp4',\n            entry_protocol='m3u8_native', m3u8_id='hls')\n        self._sort_formats(formats)\n\n        data = try_get(\n            video, lambda x: x['trackingData']['properties'], dict) or {}\n\n        duration = int_or_none(video.get('durationInSeconds')) or int_or_none(\n            video.get('duration')) or parse_duration(video.get('duration'))\n        timestamp = unified_timestamp(video.get('datePublished'))\n        creator = data.get('brand') or data.get('network') or video.get('network')\n        series = video.get('seriesName') or data.get(\n            'seriesName') or data.get('show')\n\n        subtitles = {}\n        for doc_rel in video.get('documentReleases', []):","sourceCodeStart":89,"sourceCodeEnd":125,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/fox.py#L89-L125","documentation":"Raised by the FOX extractor when fetching the video's release URL (video['url']) returns 403 and the error body does not indicate GeoLocationBlocked (that case raises a geo error instead). The body's 'description' field is surfaced as an expected error. This guards the second-stage playback-URL fetch, after the vodplayer metadata call already succeeded.","triggerScenarios":"_download_json(release_url) raises with a compat_HTTPError 403; the JSON error has no exception == 'GeoLocationBlocked', so error['description'] is raised. Happens when the CDN releasing the stream rejects the session: expired playback token, DRM-only distribution, or regional restrictions reported without the geo exception code.","commonSituations":"Long pauses between metadata fetch and playback fetch in scripts; FOX serving the akamai release URL only to entitled US sessions; content replaced by preview-only trailers for non-subscribers.","solutions":["Read the description text — it usually states the concrete rejection reason","Retry immediately with fresh cookies and a US IP so the release-URL session stays valid","Update to yt-dlp, whose FOX handling of release URLs and tokens is more current","If the description indicates subscription-only preview, supply cable-provider cookies as for other FOX errors"],"exampleFix":"# before\nyoutube_dl --cookies fox.txt 'https://www.fox.com/watch/show-episode/'\n# ERROR: <CDN description text>\n\n# after\nyt-dlp --cookies fox.txt 'https://www.fox.com/watch/show-episode/'","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    info = ydl.extract_info(url)\nexcept ExtractorError as e:\n    if 'GeoLocationBlocked' not in str(e) and caused_by_403(e):\n        retry_once_with_fresh_cookies(url)  # token/session staleness often transient","preventionTips":["Extract and download in the same run so release-URL tokens do not expire","Keep cookies fresh and use a US IP for FOX"],"tags":["fox","extractor","cdn","forbidden"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}