projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a713a86
)
[afreecatv] extract rtmp formats
author
Remita Amine
<remitamine@gmail.com>
Sat, 4 Feb 2017 17:18:03 +0000
(18:18 +0100)
committer
Remita Amine
<remitamine@gmail.com>
Sat, 4 Feb 2017 17:18:28 +0000
(18:18 +0100)
youtube_dl/extractor/afreecatv.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/afreecatv.py
b/youtube_dl/extractor/afreecatv.py
index 4f6cdb8a2a66a3941da6ce4dafa4b656d6628495..e0a0f7c57b83c7a715e7a39c16a8a71df1cbb500 100644
(file)
--- a/
youtube_dl/extractor/afreecatv.py
+++ b/
youtube_dl/extractor/afreecatv.py
@@
-221,10
+221,23
@@
class AfreecaTVGlobalIE(AfreecaTVIE):
s_url = s.get('purl')
if not s_url:
continue
s_url = s.get('purl')
if not s_url:
continue
- # TODO: extract rtmp formats
- if s
.get('stype')
== 'HLS':
+ stype = s.get('stype')
+ if s
type
== 'HLS':
formats.extend(self._extract_m3u8_formats(
formats.extend(self._extract_m3u8_formats(
- s_url, channel_id, 'mp4', fatal=False))
+ s_url, channel_id, 'mp4', m3u8_id=stype, fatal=False))
+ elif stype == 'RTMP':
+ format_id = [stype]
+ label = s.get('label')
+ if label:
+ format_id.append(label)
+ formats.append({
+ 'format_id': '-'.join(format_id),
+ 'url': s_url,
+ 'tbr': int_or_none(s.get('bps')),
+ 'height': int_or_none(s.get('brt')),
+ 'ext': 'flv',
+ 'rtmp_live': True,
+ })
self._sort_formats(formats)
info.update({
self._sort_formats(formats)
info.update({