{"record":{"id":"5e30bd738e2f4afd","repo":"ytdl-org/youtube-dl","slug":"clean-html-m-error-group-msg","errorCode":null,"errorMessage":"clean_html(m_error.group('msg'))","messagePattern":"clean_html\\(m_error\\.group\\('msg'\\)\\)","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/playvid.py","lineNumber":48,"sourceCode":"        'url': 'http://www.playvid.com/watch/hwb0GpNkzgH',\n        'md5': '39d49df503ad7b8f23a4432cbf046477',\n        'info_dict': {\n            'id': 'hwb0GpNkzgH',\n            'ext': 'mp4',\n            'title': 'Ellen Euro Cutie Blond Takes a Sexy Survey Get Facial in The Park',\n            'age_limit': 18,\n            'thumbnail': r're:^https?://.*\\.jpg$',\n        },\n    }]\n\n    def _real_extract(self, url):\n        video_id = self._match_id(url)\n        webpage = self._download_webpage(url, video_id)\n\n        m_error = re.search(\n            r'<div class=\"block-error\">\\s*<div class=\"heading\">\\s*<div>(?P<msg>.+?)</div>\\s*</div>', webpage)\n        if m_error:\n            raise ExtractorError(clean_html(m_error.group('msg')), expected=True)\n\n        video_title = None\n        duration = None\n        video_thumbnail = None\n        formats = []\n\n        # most of the information is stored in the flashvars\n        flashvars = self._html_search_regex(\n            r'flashvars=\"(.+?)\"', webpage, 'flashvars')\n\n        infos = compat_urllib_parse_unquote(flashvars).split(r'&')\n        for info in infos:\n            videovars_match = re.match(r'^video_vars\\[(.+?)\\]=(.+?)$', info)\n            if videovars_match:\n                key = videovars_match.group(1)\n                val = videovars_match.group(2)\n\n                if key == 'title':","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/playvid.py#L30-L66","documentation":"Raised by PlayVidIE when the video page contains the '<div class=\"block-error\">' block. The message is clean_html() of the matched 'msg' text — the site's own error heading (e.g. 'This video was deleted' or region notice). Expected=True, so it conveys the site's refusal, verbatim.","triggerScenarios":"Downloading a playvid.com URL whose page renders the block-error div: removed video, private video, or an error notice the site shows instead of flashvars.","commonSituations":"Adult content removed for TOS/DMCA; URLs from stale playlists; site template change renaming the div so the regex misses and you instead get a 'flashvars' search failure.","solutions":["Read the raised message — it is the site's own explanation (deleted/private/geo)","Verify the video plays in a browser from the same IP","If the regex broke after a site redesign, update yt-dlp"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    info = ydl.extract_info(url)\nexcept ExtractorError as e:\n    if e.expected:  # message is the site's own block-error heading\n        log.info('PlayVid said: %s', e)","preventionTips":["Surface the raised text to the user — it is the site's own explanation","Verify video availability in a browser when messages are ambiguous","Update the extractor if the error-div markup changes"],"tags":["playvid","content-gone","scraping","extractor-error","expected"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}