mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-02-22 09:19:59 +00: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
@ -59,6 +59,11 @@ class EpornerIE(InfoExtractor):
|
|||||||
|
|
||||||
video_id = self._match_id(urlh.geturl())
|
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(
|
hash = self._search_regex(
|
||||||
r'hash\s*[:=]\s*["\']([\da-f]{32})', webpage, 'hash')
|
r'hash\s*[:=]\s*["\']([\da-f]{32})', webpage, 'hash')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user