diff options
author | Jesús <heckyel@hyperbola.info> | 2022-04-06 03:37:17 +0800 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2022-04-06 03:37:17 +0800 |
commit | 1e5a50b71d8f0eae6007bedc329eecb24bb5aba3 (patch) | |
tree | a8611cda6596391cb6fb645e1469dcd356b63924 /hypervideo_dl/extractor/anvato.py | |
parent | f52fb3bceeb9d22b5106c1796fecec474a0cc138 (diff) | |
download | hypervideo-1e5a50b71d8f0eae6007bedc329eecb24bb5aba3.tar.lz hypervideo-1e5a50b71d8f0eae6007bedc329eecb24bb5aba3.tar.xz hypervideo-1e5a50b71d8f0eae6007bedc329eecb24bb5aba3.zip |
update from upstream
Diffstat (limited to 'hypervideo_dl/extractor/anvato.py')
-rw-r--r-- | hypervideo_dl/extractor/anvato.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/hypervideo_dl/extractor/anvato.py b/hypervideo_dl/extractor/anvato.py index b82f0b5..686d453 100644 --- a/hypervideo_dl/extractor/anvato.py +++ b/hypervideo_dl/extractor/anvato.py @@ -16,6 +16,7 @@ from ..utils import ( determine_ext, intlist_to_bytes, int_or_none, + join_nonempty, strip_jsonp, unescapeHTML, unsmuggle_url, @@ -303,13 +304,13 @@ class AnvatoIE(InfoExtractor): tbr = int_or_none(published_url.get('kbps')) a_format = { 'url': video_url, - 'format_id': ('-'.join(filter(None, ['http', published_url.get('cdn_name')]))).lower(), - 'tbr': tbr if tbr != 0 else None, + 'format_id': join_nonempty('http', published_url.get('cdn_name')).lower(), + 'tbr': tbr or None, } if media_format == 'm3u8' and tbr is not None: a_format.update({ - 'format_id': '-'.join(filter(None, ['hls', compat_str(tbr)])), + 'format_id': join_nonempty('hls', tbr), 'ext': 'mp4', }) elif media_format == 'm3u8-variant' or ext == 'm3u8': |