Browse Source

[drtv] Check for unavailable videos

totalwebcasting
Sergey M․ 10 years ago
parent
commit
aff84bec07
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      youtube_dl/extractor/drtv.py

+ 4
- 0
youtube_dl/extractor/drtv.py View File

@ -26,6 +26,10 @@ class DRTVIE(InfoExtractor):
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')


Loading…
Cancel
Save