mirror of
https://github.com/soimort/you-get.git
synced 2025-01-24 05:55:02 +03:00
added fix for nonstandard plflags on panda.tv
This commit is contained in:
parent
2baeed762a
commit
47011101a9
@ -18,10 +18,11 @@ def panda_download(url, output_dir = '.', merge = True, info_only = False, **kwa
|
|||||||
data = json.loads(content)['data']
|
data = json.loads(content)['data']
|
||||||
title = data.get('roominfo')['name']
|
title = data.get('roominfo')['name']
|
||||||
room_key = data.get('videoinfo')['room_key']
|
room_key = data.get('videoinfo')['room_key']
|
||||||
|
plflag = data.get('videoinfo')['plflag'].split('_')
|
||||||
status = data.get('videoinfo')['status']
|
status = data.get('videoinfo')['status']
|
||||||
if status is not "2":
|
if status is not "2":
|
||||||
raise ValueError("The live stream is not online! (status:%s)" % status)
|
raise ValueError("The live stream is not online! (status:%s)" % status)
|
||||||
real_url = 'http://pl3.live.panda.tv/live_panda/{}.flv'.format(room_key)
|
real_url = 'http://pl{}.live.panda.tv/live_panda/{}.flv'.format(plflag[1],room_key)
|
||||||
|
|
||||||
print_info(site_info, title, 'flv', float('inf'))
|
print_info(site_info, title, 'flv', float('inf'))
|
||||||
if not info_only:
|
if not info_only:
|
||||||
|
Loading…
Reference in New Issue
Block a user