1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-21 17:51:51 +00:00

[pandoratv] PEP 8 and simplify

This commit is contained in:
Sergey M․ 2016-12-07 23:50:10 +07:00
parent 7441915b1e
commit f43795e56b
No known key found for this signature in database
GPG key ID: 2C393E0F18A9236D

View file

@ -5,7 +5,6 @@ from .common import InfoExtractor
from ..compat import (
compat_str,
compat_urlparse,
compat_urllib_request,
)
from ..utils import (
ExtractorError,
@ -59,12 +58,16 @@ 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: