projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[compat] Introduce compat_cookiejar_Cookie
[youtube-dl]
/
youtube_dl
/
extractor
/
uol.py
diff --git
a/youtube_dl/extractor/uol.py
b/youtube_dl/extractor/uol.py
index e67083004789f250faf842ee31fc2b343ad54754..08f0c072e28b09dfbbde2f662b52f5de4cf46f3d 100644
(file)
--- a/
youtube_dl/extractor/uol.py
+++ b/
youtube_dl/extractor/uol.py
@@
-61,7
+61,7
@@
class UOLIE(InfoExtractor):
'height': 360,
},
'5': {
'height': 360,
},
'5': {
- 'width': 1
0
80,
+ 'width': 1
2
80,
'height': 720,
},
'6': {
'height': 720,
},
'6': {
@@
-80,6
+80,10
@@
class UOLIE(InfoExtractor):
'width': 568,
'height': 320,
},
'width': 568,
'height': 320,
},
+ '11': {
+ 'width': 640,
+ 'height': 360,
+ }
}
def _real_extract(self, url):
}
def _real_extract(self, url):
@@
-111,19
+115,31
@@
class UOLIE(InfoExtractor):
'ver': video_data.get('numRevision', 2),
'r': 'http://mais.uol.com.br',
}
'ver': video_data.get('numRevision', 2),
'r': 'http://mais.uol.com.br',
}
+ for k in ('token', 'sign'):
+ v = video_data.get(k)
+ if v:
+ query[k] = v
+
formats = []
for f in video_data.get('formats', []):
f_url = f.get('url') or f.get('secureUrl')
if not f_url:
continue
formats = []
for f in video_data.get('formats', []):
f_url = f.get('url') or f.get('secureUrl')
if not f_url:
continue
+ f_url = update_url_query(f_url, query)
format_id = str_or_none(f.get('id'))
format_id = str_or_none(f.get('id'))
+ if format_id == '10':
+ formats.extend(self._extract_m3u8_formats(
+ f_url, video_id, 'mp4', 'm3u8_native',
+ m3u8_id='hls', fatal=False))
+ continue
fmt = {
'format_id': format_id,
fmt = {
'format_id': format_id,
- 'url': update_url_query(f_url, query),
+ 'url': f_url,
+ 'source_preference': 1,
}
fmt.update(self._FORMATS.get(format_id, {}))
formats.append(fmt)
}
fmt.update(self._FORMATS.get(format_id, {}))
formats.append(fmt)
- self._sort_formats(formats)
+ self._sort_formats(formats
, ('height', 'width', 'source_preference', 'tbr', 'ext')
)
tags = []
for tag in video_data.get('tags', []):
tags = []
for tag in video_data.get('tags', []):