projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c3cb92d
)
[CeskaTelevize] raise ExtractorError if you are outside of CR
author
pulpe
<Pulpan3@gmail.com>
Sat, 1 Mar 2014 15:17:29 +0000
(16:17 +0100)
committer
pulpe
<Pulpan3@gmail.com>
Sat, 1 Mar 2014 15:17:29 +0000
(16:17 +0100)
youtube_dl/extractor/ceskatelevize.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/ceskatelevize.py
b/youtube_dl/extractor/ceskatelevize.py
index b1c683787d15c0ae159478c7ec1691acbf760cd6..59f2a8e451953b45d84957369a2d8b0a2d029ae4 100644
(file)
--- 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,
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)
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')
typ = self._html_search_regex(r'getPlaylistUrl\(\[\{"type":"(.+?)","id":".+?"\}\],', webpage, 'type')
episode_id = self._html_search_regex(r'getPlaylistUrl\(\[\{"type":".+?","id":"(.+?)"\}\],', webpage, 'episode_id')