{"record":{"id":"47eec1974ea93c55","repo":"ytdl-org/youtube-dl","slug":"error-while-getting-the-playlist","errorCode":null,"errorMessage":"Error while getting the playlist","messagePattern":"Error while getting the playlist","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/wistia.py","lineNumber":28,"sourceCode":"    try_get,\n    unescapeHTML,\n)\n\n\nclass WistiaBaseIE(InfoExtractor):\n    _VALID_ID_REGEX = r'(?P<id>[a-z0-9]{10})'\n    _VALID_URL_BASE = r'https?://(?:fast\\.)?wistia\\.(?:net|com)/embed/'\n    _EMBED_BASE_URL = 'http://fast.wistia.com/embed/'\n\n    def _download_embed_config(self, config_type, config_id, referer):\n        base_url = self._EMBED_BASE_URL + '%ss/%s' % (config_type, config_id)\n        embed_config = self._download_json(\n            base_url + '.json', config_id, headers={\n                'Referer': referer if referer.startswith('http') else base_url,  # Some videos require this.\n            })\n\n        if isinstance(embed_config, dict) and embed_config.get('error'):\n            raise ExtractorError(\n                'Error while getting the playlist', expected=True)\n\n        return embed_config\n\n    def _extract_media(self, embed_config):\n        data = embed_config['media']\n        video_id = data['hashedId']\n        title = data['name']\n\n        formats = []\n        thumbnails = []\n        for a in data['assets']:\n            aurl = a.get('url')\n            if not aurl:\n                continue\n            astatus = a.get('status')\n            atype = a.get('type')\n            if (astatus is not None and astatus != 2) or atype in ('preview', 'storyboard'):","sourceCodeStart":10,"sourceCodeEnd":46,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/wistia.py#L10-L46","documentation":"Raised by the Wistia extractor when the embed config JSON (fast.wistia.com/embed/<type>s/<id>.json) is a dict containing a truthy 'error' key. Wistia returns such an object when the media or playlist ID is unknown, deleted, or access-restricted, and the extractor converts it to a generic 'Error while getting the playlist' message.","triggerScenarios":"Downloading a Wistia embed whose config JSON has embed_config['error'] set — bad hashed ID (not 10-char [a-z0-9]), deleted media, or a token-protected embed requiring the Referer header the request did not satisfy.","commonSituations":"Embedding sites changed their Wistia media IDs; the video was set private or removed from the Wistia project; hotlinking an embed whose config requires the original page as Referer.","solutions":["Verify the 10-character media/playlist hashed ID in the URL is still valid by opening the embed page.","If the video was deleted or made private on Wistia, no download is possible without owner access.","Fetch the JSON directly (fast.wistia.com/embed/medias/<id>.json) to inspect the raw error Wistia returns.","Report an extractor bug only if the raw JSON is error-free while youtube-dl still fails."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import re, urllib.request\nif not re.fullmatch(r'[a-z0-9]{10}', media_id):\n    print('invalid Wistia hashed ID — will fail')\nelse:\n    cfg = json.load(urllib.request.urlopen(f'http://fast.wistia.com/embed/medias/{media_id}.json'))\n    if isinstance(cfg, dict) and cfg.get('error'):\n        print('Wistia reports an error for this ID')","typeGuard":"def wistia_config_ok(config) -> bool:\n    return isinstance(config, dict) and not config.get('error') and 'media' in config","tryCatchPattern":"try:\n    info = ydl.extract_info(url)\nexcept ExtractorError as e:\n    if 'getting the playlist' in str(e):\n        verify_media_id(url)\n    else:\n        raise","preventionTips":["Validate the 10-char [a-z0-9] hashed ID before extraction.","Fetch the embed JSON yourself to see Wistia's raw error for deleted/private media.","Keep the original page URL as Referer context when extracting embeds."],"tags":["api-error","embed","extractor","wistia"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}