ytdl-org/youtube-dl · error · ExtractorError
clean_html(m_error.group('msg'))
Error message
clean_html(m_error.group('msg')) What it means
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.
Source
Thrown at youtube_dl/extractor/playvid.py:48
'url': 'http://www.playvid.com/watch/hwb0GpNkzgH',
'md5': '39d49df503ad7b8f23a4432cbf046477',
'info_dict': {
'id': 'hwb0GpNkzgH',
'ext': 'mp4',
'title': 'Ellen Euro Cutie Blond Takes a Sexy Survey Get Facial in The Park',
'age_limit': 18,
'thumbnail': r're:^https?://.*\.jpg$',
},
}]
def _real_extract(self, url):
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
m_error = re.search(
r'<div class="block-error">\s*<div class="heading">\s*<div>(?P<msg>.+?)</div>\s*</div>', webpage)
if m_error:
raise ExtractorError(clean_html(m_error.group('msg')), expected=True)
video_title = None
duration = None
video_thumbnail = None
formats = []
# most of the information is stored in the flashvars
flashvars = self._html_search_regex(
r'flashvars="(.+?)"', webpage, 'flashvars')
infos = compat_urllib_parse_unquote(flashvars).split(r'&')
for info in infos:
videovars_match = re.match(r'^video_vars\[(.+?)\]=(.+?)$', info)
if videovars_match:
key = videovars_match.group(1)
val = videovars_match.group(2)
if key == 'title':View on GitHub (pinned to 956b8c5855)
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
Defensive patterns
Strategy: try-catch
Try / catch
try:
info = ydl.extract_info(url)
except ExtractorError as e:
if e.expected: # message is the site's own block-error heading
log.info('PlayVid said: %s', e) Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
AI-assisted analysis of ytdl-org/youtube-dl@956b8c5855 (2026-08-14).
Data as JSON: /api/errors/5e30bd738e2f4afd.
Report an issue: GitHub.