Browse Source

[snagfilms] Capture not available error

totalwebcasting
Sergey M․ 10 years ago
parent
commit
a42a1bb09d
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      youtube_dl/extractor/snagfilms.py

+ 5
- 1
youtube_dl/extractor/snagfilms.py View File

@ -43,7 +43,7 @@ class SnagFilmsEmbedIE(InfoExtractor):
if '>This film is not playable in your area.<' in webpage: if '>This film is not playable in your area.<' in webpage:
raise ExtractorError( raise ExtractorError(
'This film is not playable in your area.', expected=True)
'Film %s is not playable in your area.' % video_id, expected=True)
formats = [] formats = []
for source in self._parse_json(js_to_json(self._search_regex( for source in self._parse_json(js_to_json(self._search_regex(
@ -116,6 +116,10 @@ class SnagFilmsIE(InfoExtractor):
webpage = self._download_webpage(url, display_id) webpage = self._download_webpage(url, display_id)
if ">Sorry, the Film you're looking for is not available.<" in webpage:
raise ExtractorError(
'Film %s is not available.' % display_id, expected=True)
film_id = self._search_regex(r'filmId=([\da-f-]{36})"', webpage, 'film id') film_id = self._search_regex(r'filmId=([\da-f-]{36})"', webpage, 'film id')
snag = self._parse_json( snag = self._parse_json(


Loading…
Cancel
Save