mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-08-20 21:34:01 -07:00
[Eporner] Check if video was deleted
This gives user a friendly error message, instead of a stacktrace
This commit is contained in:
parent
5975d7bb96
commit
c15351641c
1 changed files with 5 additions and 0 deletions
|
@ -59,6 +59,11 @@ 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:
|
||||
raise ExtractorError(
|
||||
'Video %s has been deleted' % video_id, expected=True)
|
||||
|
||||
hash = self._search_regex(
|
||||
r'hash\s*[:=]\s*["\']([\da-f]{32})', webpage, 'hash')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue