Browse Source

[CeskaTelevize] raise ExtractorError if you are outside of CR

totalwebcasting
pulpe 11 years ago
parent
commit
392017874c
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      youtube_dl/extractor/ceskatelevize.py

+ 6
- 1
youtube_dl/extractor/ceskatelevize.py View File

@ -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')


Loading…
Cancel
Save