From 00628a0bdb025e8df4515fb5f99a7cfec1f5e2a2 Mon Sep 17 00:00:00 2001 From: rywko <43437992+rywko@users.noreply.github.com> Date: Tue, 31 Dec 2019 13:26:36 +0100 Subject: [PATCH] Update dailymotionresolver.py --- lib/server/dailymotionresolver.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/server/dailymotionresolver.py b/lib/server/dailymotionresolver.py index a334232..4b356e6 100644 --- a/lib/server/dailymotionresolver.py +++ b/lib/server/dailymotionresolver.py @@ -77,4 +77,15 @@ def resolve(url): item['lang'] = '???' item['headers'] = headers result.append(newitem) + if not result and cc[0][0]=='auto': + json_source=cc[0][1] + m_url=json_source[0].get('url', None) + r = util.request(m_url) + streams = re.compile(r'RESOLUTION=\d+x(\d+).*\n([^\s]+)').findall(r) + for quality, url in streams: + item = {} + item['url'] = url + item['quality'] = quality + 'p' + item['title'] = 'video' + result.append(item) return result