]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[pandoratv] PEP 8 and simplify
authorSergey M․ <dstftw@gmail.com>
Wed, 7 Dec 2016 16:50:10 +0000 (23:50 +0700)
committerSergey M․ <dstftw@gmail.com>
Wed, 7 Dec 2016 16:50:10 +0000 (23:50 +0700)
youtube_dl/extractor/pandoratv.py

index 3e37ae01d2e28ddf9600f46bc79aa27dd0c62c3c..cbb1968d37032e0adf64d9612470e10ac8823acd 100644 (file)
@@ -5,7 +5,6 @@ from .common import InfoExtractor
 from ..compat import (
     compat_str,
     compat_urlparse,
-    compat_urllib_request,
 )
 from ..utils import (
     ExtractorError,
@@ -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