0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-27 03:03:01 +00:00

[drtv] Check for unavailable videos

This commit is contained in:
Sergey M․ 2015-04-04 23:17:09 +06:00
parent ac651e974e
commit aff84bec07

View file

@ -26,6 +26,10 @@ def _real_extract(self, url):
webpage = self._download_webpage(url, video_id)
if '>Programmet er ikke længere tilgængeligt' in webpage:
raise ExtractorError(
'Video %s is not available' % video_id, expected=True)
video_id = self._search_regex(
r'data-(?:material-identifier|episode-slug)="([^"]+)"',
webpage, 'video id')