mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-02 09:12:40 +01:00
[spankbang] Improve removed video detection (#23423)
This commit is contained in:
parent
2b845c4086
commit
0a02732b56
@ -65,7 +65,7 @@ def _real_extract(self, url):
|
|||||||
url.replace('/%s/embed' % video_id, '/%s/video' % video_id),
|
url.replace('/%s/embed' % video_id, '/%s/video' % video_id),
|
||||||
video_id, headers={'Cookie': 'country=US'})
|
video_id, headers={'Cookie': 'country=US'})
|
||||||
|
|
||||||
if re.search(r'<[^>]+\bid=["\']video_removed', webpage):
|
if re.search(r'<[^>]+\b(?:id|class)=["\']video_removed', webpage):
|
||||||
raise ExtractorError(
|
raise ExtractorError(
|
||||||
'Video %s is not available' % video_id, expected=True)
|
'Video %s is not available' % video_id, expected=True)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user