diff options
author | Sergey M․ <[email protected]> | 2015-11-15 23:43:23 +0600 |
---|---|---|
committer | Sergey M․ <[email protected]> | 2015-11-15 23:43:23 +0600 |
commit | ad1f4e7902464532ba11f3a09ac6ff2312b01661 (patch) | |
tree | 8cadabbd510a6da3f7a176b2ff0ab9e1d4f7d7b1 | |
parent | b328295910c2d69822819450617cff2a1cf53106 (diff) | |
download | youtube-dl-ad1f4e7902464532ba11f3a09ac6ff2312b01661.tar.gz youtube-dl-ad1f4e7902464532ba11f3a09ac6ff2312b01661.zip |
[theplatform] Handle explicitly specified SMIL (#7385)
-rw-r--r-- | youtube_dl/extractor/theplatform.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/youtube_dl/extractor/theplatform.py b/youtube_dl/extractor/theplatform.py index 25edc3100..114c70b7c 100644 --- a/youtube_dl/extractor/theplatform.py +++ b/youtube_dl/extractor/theplatform.py @@ -193,6 +193,15 @@ class ThePlatformIE(ThePlatformBaseIE): if smuggled_data.get('force_smil_url', False): smil_url = url + # Explicitly specified SMIL (see https://github.com/rg3/youtube-dl/issues/7385) + elif '/guid/' in url: + webpage = self._download_webpage(url, video_id) + smil_url = self._search_regex( + r'<link[^>]+href=(["\'])(?P<url>.+?)\1[^>]+type=["\']application/smil\+xml', + webpage, 'smil url', group='url') + path = self._search_regex( + r'link\.theplatform\.com/s/((?:[^/?#&]+/)+[^/?#&]+)', smil_url, 'path') + smil_url += '?' if '?' not in smil_url else '&' + 'formats=m3u,mpeg4&format=SMIL' elif mobj.group('config'): config_url = url + '&form=json' config_url = config_url.replace('swf/', 'config/') |