Compare commits

...

3 Commits

Author SHA1 Message Date
Michał Połtyn
ad16582a1d
Merge 8d2170c713253c02eee11d3b1822a6dd808545fc into 3eb8d22ddb8982ca4fb56bb7a8d6517538bf14c6 2025-04-01 07:44:56 +02:00
Michał Połtyn
8d2170c713
Relax HTML constraints on error message
Co-authored-by: dirkf <fieldhouse@gmx.net>
2025-03-08 22:01:54 +01:00
Michał Połtyn
c15351641c
[Eporner] Check if video was deleted
This gives user a friendly error message, instead of a stacktrace
2025-01-30 15:20:10 +01:00

View File

@ -59,6 +59,13 @@ class EpornerIE(InfoExtractor):
video_id = self._match_id(urlh.geturl())
missing = self._html_search_regex((
r'<strong>\s*(Video has been deleted)\s*</strong>',
), webpage, 'missing', default=None)
if missing:
raise ExtractorError(
'Video %s is not available: "%s"' % (video_id, missing), expected=True)
hash = self._search_regex(
r'hash\s*[:=]\s*["\']([\da-f]{32})', webpage, 'hash')