aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpulpe <Pulpan3@gmail.com>2014-03-01 16:17:29 +0100
committerpulpe <Pulpan3@gmail.com>2014-03-01 16:17:29 +0100
commit392017874c646cd884817fb5c16d101b67f20760 (patch)
treebac40f5222bc78d6e2efd64bccdaa550a60c997e
parentc3cb92d1ab1b4d449dde9e234a1854c85d093ecc (diff)
[CeskaTelevize] raise ExtractorError if you are outside of CR
-rw-r--r--youtube_dl/extractor/ceskatelevize.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/youtube_dl/extractor/ceskatelevize.py b/youtube_dl/extractor/ceskatelevize.py
index b1c683787..59f2a8e45 100644
--- a/youtube_dl/extractor/ceskatelevize.py
+++ b/youtube_dl/extractor/ceskatelevize.py
@@ -8,7 +8,8 @@ from .common import InfoExtractor
from ..utils import (
compat_urllib_request,
compat_urllib_parse,
- compat_urllib_parse_urlparse
+ compat_urllib_parse_urlparse,
+ ExtractorError,
)
@@ -49,6 +50,10 @@ class CeskaTelevizeIE(InfoExtractor):
webpage = self._download_webpage(url, video_id)
+ if '<p class="title">Chyba konfigurace prohlížeče.</p>' not in webpage:
+ msg = self._html_search_regex(r'<p class="title">(.+?)</p>', webpage, 'error-message')
+ raise ExtractorError(msg.replace('<br />', ' '))
+
typ = self._html_search_regex(r'getPlaylistUrl\(\[\{"type":"(.+?)","id":".+?"\}\],', webpage, 'type')
episode_id = self._html_search_regex(r'getPlaylistUrl\(\[\{"type":".+?","id":"(.+?)"\}\],', webpage, 'episode_id')