aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-06-27 18:54:08 +0600
committerSergey M․ <dstftw@gmail.com>2015-06-27 18:54:08 +0600
commita42a1bb09dd1c86b4d35eedf1104d8e51b6c407b (patch)
tree0e33768d3bb17fa9e21a5ac2ba987fd6cfd287ec
parent9fbfc9bd4dd076e2b00f68dc43ce4fa0ed72c949 (diff)
[snagfilms] Capture not available error
-rw-r--r--youtube_dl/extractor/snagfilms.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/youtube_dl/extractor/snagfilms.py b/youtube_dl/extractor/snagfilms.py
index 2b1838bf9..1be7dd13b 100644
--- a/youtube_dl/extractor/snagfilms.py
+++ b/youtube_dl/extractor/snagfilms.py
@@ -43,7 +43,7 @@ class SnagFilmsEmbedIE(InfoExtractor):
if '>This film is not playable in your area.<' in webpage:
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 = []
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)
+ 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')
snag = self._parse_json(