Update drtuber.py
This commit is contained in:
parent
eb3ce2710a
commit
0f7a523589
@ -44,20 +44,21 @@ class DrTuberIE(InfoExtractor):
|
|||||||
webpage = self._download_webpage(
|
webpage = self._download_webpage(
|
||||||
'http://www.drtuber.com/video/%s' % video_id, display_id)
|
'http://www.drtuber.com/video/%s' % video_id, display_id)
|
||||||
|
|
||||||
video_data = self._download_json('http://www.drtuber.com/player_config_json/', video_id, query={
|
video_data = self._download_json(
|
||||||
'vid': video_id,
|
'http://www.drtuber.com/player_config_json/', video_id, query={
|
||||||
'embed': 0,
|
'vid': video_id,
|
||||||
'aid': 0,
|
'embed': 0,
|
||||||
'domain_id': 0,
|
'aid': 0,
|
||||||
})
|
'domain_id': 0,
|
||||||
|
})
|
||||||
|
|
||||||
formats = []
|
formats = []
|
||||||
for video_url_key, video_url_value in video_data['files'].items():
|
for format_id, video_url in video_data['files'].items():
|
||||||
if video_url_value:
|
if video_url:
|
||||||
formats.append({
|
formats.append({
|
||||||
'format_id': video_url_key.upper(),
|
'format_id': format_id,
|
||||||
'quality': 2 if video_url_key == 'hq' else 1,
|
'quality': 2 if format_id == 'hq' else 1,
|
||||||
'url': video_url_value
|
'url': video_url
|
||||||
})
|
})
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user