aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2018-03-19 23:28:37 +0700
committerSergey M․ <dstftw@gmail.com>2018-03-19 23:29:53 +0700
commit9a054fcbbadf06101b081f8be0594b38b654364f (patch)
tree25e871db4dc765f6a61de37ef61139edb937f7cb /youtube_dl/extractor
parent6e3f23d912ae2b7018a13f87ff89572dfac10d02 (diff)
[ceskatelevize] Add support for iframe embeds (closes #15918)
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r--youtube_dl/extractor/ceskatelevize.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/youtube_dl/extractor/ceskatelevize.py b/youtube_dl/extractor/ceskatelevize.py
index e250de18c..6bad90859 100644
--- a/youtube_dl/extractor/ceskatelevize.py
+++ b/youtube_dl/extractor/ceskatelevize.py
@@ -13,6 +13,7 @@ from ..utils import (
float_or_none,
sanitized_Request,
unescapeHTML,
+ update_url_query,
urlencode_postdata,
USER_AGENTS,
)
@@ -265,6 +266,10 @@ class CeskaTelevizePoradyIE(InfoExtractor):
# m3u8 download
'skip_download': True,
},
+ }, {
+ # iframe embed
+ 'url': 'http://www.ceskatelevize.cz/porady/10614999031-neviditelni/21251212048/',
+ 'only_matching': True,
}]
def _real_extract(self, url):
@@ -272,8 +277,11 @@ class CeskaTelevizePoradyIE(InfoExtractor):
webpage = self._download_webpage(url, video_id)
- data_url = unescapeHTML(self._search_regex(
- r'<span[^>]*\bdata-url=(["\'])(?P<url>(?:(?!\1).)+)\1',
- webpage, 'iframe player url', group='url'))
+ data_url = update_url_query(unescapeHTML(self._search_regex(
+ (r'<span[^>]*\bdata-url=(["\'])(?P<url>(?:(?!\1).)+)\1',
+ r'<iframe[^>]+\bsrc=(["\'])(?P<url>(?:https?:)?//(?:www\.)?ceskatelevize\.cz/ivysilani/embed/iFramePlayer\.php.*?)\1'),
+ webpage, 'iframe player url', group='url')), query={
+ 'autoStart': 'true',
+ })
return self.url_result(data_url, ie=CeskaTelevizeIE.ie_key())