diff options
author | Yen Chi Hsuan <yan12125@gmail.com> | 2016-06-18 12:21:40 +0800 |
---|---|---|
committer | Yen Chi Hsuan <yan12125@gmail.com> | 2016-06-18 12:21:40 +0800 |
commit | 26264cb0566309bcdc7f0f2a8ee376bf205fc675 (patch) | |
tree | 9f25f5b28a63b87245c2a56637dbd3cc5406e847 | |
parent | a72df5f36feddaffbcfa35e3415562509a9f67b4 (diff) |
[adobetv] Use embedded data in the webpage
Sometimes the HTML webpage is returned even with '?format=json'
-rw-r--r-- | youtube_dl/extractor/adobetv.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/youtube_dl/extractor/adobetv.py b/youtube_dl/extractor/adobetv.py index 8753ee2cf..5ae16fa16 100644 --- a/youtube_dl/extractor/adobetv.py +++ b/youtube_dl/extractor/adobetv.py @@ -156,7 +156,10 @@ class AdobeTVVideoIE(InfoExtractor): def _real_extract(self, url): video_id = self._match_id(url) - video_data = self._download_json(url + '?format=json', video_id) + webpage = self._download_webpage(url, video_id) + + video_data = self._parse_json(self._search_regex( + r'var\s+bridge\s*=\s*([^;]+);', webpage, 'bridged data'), video_id) formats = [{ 'format_id': '%s-%s' % (determine_ext(source['src']), source.get('height')), |