mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-04-14 06:41:18 +00:00
Relax HTML constraints on error message
Co-authored-by: dirkf <fieldhouse@gmx.net>
This commit is contained in:
parent
c15351641c
commit
8d2170c713
@ -59,10 +59,12 @@ class EpornerIE(InfoExtractor):
|
||||
|
||||
video_id = self._match_id(urlh.geturl())
|
||||
|
||||
deleted = self._html_search_regex(r'<strong>Video has been deleted</strong>', webpage, 'deleted', default=False, fatal=False, group=0)
|
||||
if deleted:
|
||||
missing = self._html_search_regex((
|
||||
r'<strong>\s*(Video has been deleted)\s*</strong>',
|
||||
), webpage, 'missing', default=None)
|
||||
if missing:
|
||||
raise ExtractorError(
|
||||
'Video %s has been deleted' % video_id, expected=True)
|
||||
'Video %s is not available: "%s"' % (video_id, missing), expected=True)
|
||||
|
||||
hash = self._search_regex(
|
||||
r'hash\s*[:=]\s*["\']([\da-f]{32})', webpage, 'hash')
|
||||
|
Loading…
Reference in New Issue
Block a user