Skip to content

Commit

Permalink
Update dailymotionresolver.py
Browse files Browse the repository at this point in the history
  • Loading branch information
rywko authored Dec 31, 2019
1 parent 5c6faa6 commit 00628a0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/server/dailymotionresolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 00628a0

Please sign in to comment.