{"record":{"id":"9241abb6d9f4c6b4","repo":"ytdl-org/youtube-dl","slug":"s-said-s-9241ab","errorCode":null,"errorMessage":"%s said: %s","messagePattern":"%s said: %s","errorType":"exception","errorClass":"ExtractorError","httpStatus":400,"severity":"error","filePath":"youtube_dl/extractor/vice.py","lineNumber":160,"sourceCode":"        exp = int(time.time()) + 1440\n\n        query.update({\n            'exp': exp,\n            'sign': hashlib.sha512(('%s:GET:%d' % (video_id, exp)).encode()).hexdigest(),\n            'skipadstitching': 1,\n            'platform': 'desktop',\n            'rn': random.randint(10000, 100000),\n        })\n\n        try:\n            preplay = self._download_json(\n                'https://vms.vice.com/%s/video/preplay/%s' % (locale, video_id),\n                video_id, query=query)\n        except ExtractorError as e:\n            if isinstance(e.cause, compat_HTTPError) and e.cause.code in (400, 401):\n                error = json.loads(e.cause.read().decode())\n                error_message = error.get('error_description') or error['details']\n                raise ExtractorError('%s said: %s' % (\n                    self.IE_NAME, error_message), expected=True)\n            raise\n\n        video_data = preplay['video']\n        formats = self._extract_m3u8_formats(\n            preplay['playURL'], video_id, 'mp4', 'm3u8_native')\n        self._sort_formats(formats)\n        episode = video_data.get('episode') or {}\n        channel = video_data.get('channel') or {}\n        season = video_data.get('season') or {}\n\n        subtitles = {}\n        for subtitle in preplay.get('subtitleURLs', []):\n            cc_url = subtitle.get('url')\n            if not cc_url:\n                continue\n            language_code = try_get(subtitle, lambda x: x['languages'][0]['language_code'], compat_str) or 'en'\n            subtitles.setdefault(language_code, []).append({","sourceCodeStart":142,"sourceCodeEnd":178,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/vice.py#L142-L178","documentation":"Raised by the Vice extractor when the vms.vice.com preplay call fails with HTTP 400 or 401 and the JSON body contains error_description or details; that text is re-raised with the extractor name. 401 typically means the signed query (platform/rn signature) was rejected; 400 means bad video id/locale. expected=True.","triggerScenarios":"Calling the preplay endpoint for a removed video, an unknown locale segment, or when the ad/signature parameters in 'query' no longer satisfy Vice's VMS validation, yielding e.cause.code in (400, 401).","commonSituations":"Vice changed the required preplay signature parameters (the query dict with 'platform': 'desktop', 'rn': random); videos geo- or age-restricted; site restructures after Vice Media's domain consolidations.","solutions":["Read the propagated error_description — it distinguishes missing video from auth/signature failure.","If all Vice URLs fail, diff the browser's preplay request query against the extractor's 'query' dict and update the signing parameters.","Confirm the locale extracted from the URL still matches a valid vms.vice.com path segment.","Upgrade youtube-dl to pick up upstream fixes to the preplay query."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    ydl.extract_info(url)\nexcept ExtractorError as e:\n    if e.expected and 'said:' in str(e):\n        log_skip(url, str(e))  # 400 = bad id/locale, 401 = signature rejected — both need code/config change, not retry\n    raise","preventionTips":["If the error fires on all Vice URLs, fix the preplay query signature, not the URLs.","Log the HTTP code alongside the message (400 vs 401) when instrumenting.","Keep the extractor updated — Vice's VMS signing parameters change periodically."],"tags":["api","http-error","auth","signature","site-side-rejection"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}