aboutsummaryrefslogtreecommitdiffstats
path: root/hypervideo_dl/extractor/vlive.py
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2022-12-02 05:21:10 +0800
committerJesús <heckyel@hyperbola.info>2022-12-02 05:21:10 +0800
commiteaeeef9c1d1bedb76fea953c332ef84d53bffe2c (patch)
treec3cb5582247e47fc67c24cd7ff8ea857fb76821e /hypervideo_dl/extractor/vlive.py
parent1e5a50b71d8f0eae6007bedc329eecb24bb5aba3 (diff)
downloadhypervideo-eaeeef9c1d1bedb76fea953c332ef84d53bffe2c.tar.lz
hypervideo-eaeeef9c1d1bedb76fea953c332ef84d53bffe2c.tar.xz
hypervideo-eaeeef9c1d1bedb76fea953c332ef84d53bffe2c.zip
update from upstream
Diffstat (limited to 'hypervideo_dl/extractor/vlive.py')
-rw-r--r--hypervideo_dl/extractor/vlive.py21
1 files changed, 16 insertions, 5 deletions
diff --git a/hypervideo_dl/extractor/vlive.py b/hypervideo_dl/extractor/vlive.py
index ae35c97..e2fd393 100644
--- a/hypervideo_dl/extractor/vlive.py
+++ b/hypervideo_dl/extractor/vlive.py
@@ -1,6 +1,3 @@
-# coding: utf-8
-from __future__ import unicode_literals
-
import itertools
import json
@@ -16,6 +13,7 @@ from ..utils import (
merge_dicts,
str_or_none,
strip_or_none,
+ traverse_obj,
try_get,
urlencode_postdata,
url_or_none,
@@ -84,6 +82,13 @@ class VLiveIE(VLiveBaseIE):
'upload_date': '20150817',
'thumbnail': r're:^https?://.*\.(?:jpg|png)$',
'timestamp': 1439816449,
+ 'like_count': int,
+ 'channel': 'Girl\'s Day',
+ 'channel_id': 'FDF27',
+ 'comment_count': int,
+ 'release_timestamp': 1439818140,
+ 'release_date': '20150817',
+ 'duration': 1014,
},
'params': {
'skip_download': True,
@@ -101,6 +106,13 @@ class VLiveIE(VLiveBaseIE):
'upload_date': '20161112',
'thumbnail': r're:^https?://.*\.(?:jpg|png)$',
'timestamp': 1478923074,
+ 'like_count': int,
+ 'channel': 'EXO',
+ 'channel_id': 'F94BD',
+ 'comment_count': int,
+ 'release_timestamp': 1478924280,
+ 'release_date': '20161112',
+ 'duration': 906,
},
'params': {
'skip_download': True,
@@ -172,6 +184,7 @@ class VLiveIE(VLiveBaseIE):
'like_count': int_or_none(video.get('likeCount')),
'comment_count': int_or_none(video.get('commentCount')),
'timestamp': int_or_none(video.get('createdAt'), scale=1000),
+ 'release_timestamp': int_or_none(traverse_obj(video, 'onAirStartAt', 'willStartAt'), scale=1000),
'thumbnail': video.get('thumb'),
}
@@ -195,7 +208,6 @@ class VLiveIE(VLiveBaseIE):
'old/v3/live/%s/playInfo',
video_id)['result']['adaptiveStreamUrl']
formats = self._extract_m3u8_formats(stream_url, video_id, 'mp4')
- self._sort_formats(formats)
info = get_common_fields()
info.update({
'title': video['title'],
@@ -273,7 +285,6 @@ class VLivePostIE(VLiveBaseIE):
'url': f_url,
'height': int_or_none(f_id[:-1]),
})
- self._sort_formats(formats)
entry = {
'formats': formats,
'id': video_id,