From 47011101a940f2884aaa1a41c3a72ac7e6f37cda Mon Sep 17 00:00:00 2001 From: Valdemar Erk Date: Wed, 7 Sep 2016 10:47:38 +0200 Subject: [PATCH] added fix for nonstandard plflags on panda.tv --- src/you_get/extractors/panda.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/you_get/extractors/panda.py b/src/you_get/extractors/panda.py index 74064f9f..3f9ceade 100644 --- a/src/you_get/extractors/panda.py +++ b/src/you_get/extractors/panda.py @@ -18,10 +18,11 @@ def panda_download(url, output_dir = '.', merge = True, info_only = False, **kwa data = json.loads(content)['data'] title = data.get('roominfo')['name'] room_key = data.get('videoinfo')['room_key'] + plflag = data.get('videoinfo')['plflag'].split('_') status = data.get('videoinfo')['status'] if status is not "2": 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')) if not info_only: