mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-24 03:41:00 +01:00
[pandoratv] PEP 8 and simplify
This commit is contained in:
parent
7441915b1e
commit
f43795e56b
|
@ -5,7 +5,6 @@
|
||||||
from ..compat import (
|
from ..compat import (
|
||||||
compat_str,
|
compat_str,
|
||||||
compat_urlparse,
|
compat_urlparse,
|
||||||
compat_urllib_request,
|
|
||||||
)
|
)
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
ExtractorError,
|
ExtractorError,
|
||||||
|
@ -59,13 +58,17 @@ def _real_extract(self, url):
|
||||||
if not height:
|
if not height:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
post_data = {'prgid': video_id, 'runtime': info.get('runtime'), 'vod_url': format_url}
|
play_url = self._download_json(
|
||||||
play_url = self._download_json('http://m.pandora.tv/?c=api&m=play_url', video_id,
|
'http://m.pandora.tv/?c=api&m=play_url', video_id,
|
||||||
data=urlencode_postdata(post_data),
|
data=urlencode_postdata({
|
||||||
|
'prgid': video_id,
|
||||||
|
'runtime': info.get('runtime'),
|
||||||
|
'vod_url': format_url,
|
||||||
|
}),
|
||||||
headers={
|
headers={
|
||||||
'Origin': url,
|
'Origin': url,
|
||||||
'Content-Type': 'application/x-www-form-urlencoded'
|
'Content-Type': 'application/x-www-form-urlencoded',
|
||||||
})
|
})
|
||||||
format_url = play_url.get('url')
|
format_url = play_url.get('url')
|
||||||
if not format_url:
|
if not format_url:
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue
Block a user