X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fpandoratv.py;h=89c95fffb6e6ca7279d927424c19be9325e2ac4d;hb=ec85ded83cbfa652ba94cb080aab52d8b270212a;hp=3e37ae01d2e28ddf9600f46bc79aa27dd0c62c3c;hpb=7441915b1e53e2a26f4c78796c4755a36b9e1b8d;p=youtube-dl diff --git a/youtube_dl/extractor/pandoratv.py b/youtube_dl/extractor/pandoratv.py index 3e37ae01d..89c95fffb 100644 --- a/youtube_dl/extractor/pandoratv.py +++ b/youtube_dl/extractor/pandoratv.py @@ -5,7 +5,6 @@ from .common import InfoExtractor from ..compat import ( compat_str, compat_urlparse, - compat_urllib_request, ) from ..utils import ( ExtractorError, @@ -27,7 +26,7 @@ class PandoraTVIE(InfoExtractor): 'ext': 'flv', 'title': '頭を撫でてくれる?', 'description': '頭を撫でてくれる?', - 'thumbnail': 're:^https?://.*\.jpg$', + 'thumbnail': r're:^https?://.*\.jpg$', 'duration': 39, 'upload_date': '20151218', 'uploader': 'カワイイ動物まとめ', @@ -59,13 +58,17 @@ class PandoraTVIE(InfoExtractor): if not height: continue - post_data = {'prgid': video_id, 'runtime': info.get('runtime'), 'vod_url': format_url} - play_url = self._download_json('http://m.pandora.tv/?c=api&m=play_url', video_id, - data=urlencode_postdata(post_data), + play_url = self._download_json( + 'http://m.pandora.tv/?c=api&m=play_url', video_id, + data=urlencode_postdata({ + 'prgid': video_id, + 'runtime': info.get('runtime'), + 'vod_url': format_url, + }), headers={ 'Origin': url, - 'Content-Type': 'application/x-www-form-urlencoded' - }) + 'Content-Type': 'application/x-www-form-urlencoded', + }) format_url = play_url.get('url') if not format_url: continue