mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
[VLive] Add upload_date and thumbnail (#1486)
Closes #1472 Authored by: Ashish0804
This commit is contained in:
parent
6b301aaa34
commit
652fb0d446
2 changed files with 15 additions and 3 deletions
|
@ -40,6 +40,7 @@ def extract_formats(streams, stream_type, query={}):
|
||||||
formats.append({
|
formats.append({
|
||||||
'format_id': '%s_%s' % (stream.get('type') or stream_type, dict_get(encoding_option, ('name', 'id'))),
|
'format_id': '%s_%s' % (stream.get('type') or stream_type, dict_get(encoding_option, ('name', 'id'))),
|
||||||
'url': stream_url,
|
'url': stream_url,
|
||||||
|
'ext': 'mp4',
|
||||||
'width': int_or_none(encoding_option.get('width')),
|
'width': int_or_none(encoding_option.get('width')),
|
||||||
'height': int_or_none(encoding_option.get('height')),
|
'height': int_or_none(encoding_option.get('height')),
|
||||||
'vbr': int_or_none(bitrate.get('video')),
|
'vbr': int_or_none(bitrate.get('video')),
|
||||||
|
@ -174,7 +175,7 @@ class NaverLiveIE(InfoExtractor):
|
||||||
'url': 'https://tv.naver.com/l/52010',
|
'url': 'https://tv.naver.com/l/52010',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '52010',
|
'id': '52010',
|
||||||
'ext': 'm3u8',
|
'ext': 'mp4',
|
||||||
'title': '[LIVE] 뉴스특보 : "수도권 거리두기, 2주간 2단계로 조정"',
|
'title': '[LIVE] 뉴스특보 : "수도권 거리두기, 2주간 2단계로 조정"',
|
||||||
'description': 'md5:df7f0c237a5ed5e786ce5c91efbeaab3',
|
'description': 'md5:df7f0c237a5ed5e786ce5c91efbeaab3',
|
||||||
'channel_id': 'NTV-ytnnews24-0',
|
'channel_id': 'NTV-ytnnews24-0',
|
||||||
|
@ -184,7 +185,7 @@ class NaverLiveIE(InfoExtractor):
|
||||||
'url': 'https://tv.naver.com/l/51549',
|
'url': 'https://tv.naver.com/l/51549',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '51549',
|
'id': '51549',
|
||||||
'ext': 'm3u8',
|
'ext': 'mp4',
|
||||||
'title': '연합뉴스TV - 코로나19 뉴스특보',
|
'title': '연합뉴스TV - 코로나19 뉴스특보',
|
||||||
'description': 'md5:c655e82091bc21e413f549c0eaccc481',
|
'description': 'md5:c655e82091bc21e413f549c0eaccc481',
|
||||||
'channel_id': 'NTV-yonhapnewstv-0',
|
'channel_id': 'NTV-yonhapnewstv-0',
|
||||||
|
@ -233,7 +234,7 @@ def _extract_video_info(self, video_id, url):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
formats.extend(self._extract_m3u8_formats(
|
formats.extend(self._extract_m3u8_formats(
|
||||||
quality.get('url'), video_id, 'm3u8',
|
quality.get('url'), video_id, 'mp4',
|
||||||
m3u8_id=quality.get('qualityId'), live=True
|
m3u8_id=quality.get('qualityId'), live=True
|
||||||
))
|
))
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
|
|
|
@ -86,6 +86,12 @@ class VLiveIE(VLiveBaseIE):
|
||||||
'creator': "Girl's Day",
|
'creator': "Girl's Day",
|
||||||
'view_count': int,
|
'view_count': int,
|
||||||
'uploader_id': 'muploader_a',
|
'uploader_id': 'muploader_a',
|
||||||
|
'upload_date': '20150817',
|
||||||
|
'thumbnail': r're:^https?://.*\.(?:jpg|png)$',
|
||||||
|
'timestamp': 1439816449,
|
||||||
|
},
|
||||||
|
'params': {
|
||||||
|
'skip_download': True,
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
'url': 'http://www.vlive.tv/video/16937',
|
'url': 'http://www.vlive.tv/video/16937',
|
||||||
|
@ -97,6 +103,9 @@ class VLiveIE(VLiveBaseIE):
|
||||||
'view_count': int,
|
'view_count': int,
|
||||||
'subtitles': 'mincount:12',
|
'subtitles': 'mincount:12',
|
||||||
'uploader_id': 'muploader_j',
|
'uploader_id': 'muploader_j',
|
||||||
|
'upload_date': '20161112',
|
||||||
|
'thumbnail': r're:^https?://.*\.(?:jpg|png)$',
|
||||||
|
'timestamp': 1478923074,
|
||||||
},
|
},
|
||||||
'params': {
|
'params': {
|
||||||
'skip_download': True,
|
'skip_download': True,
|
||||||
|
@ -173,6 +182,8 @@ def get_common_fields():
|
||||||
'view_count': int_or_none(video.get('playCount')),
|
'view_count': int_or_none(video.get('playCount')),
|
||||||
'like_count': int_or_none(video.get('likeCount')),
|
'like_count': int_or_none(video.get('likeCount')),
|
||||||
'comment_count': int_or_none(video.get('commentCount')),
|
'comment_count': int_or_none(video.get('commentCount')),
|
||||||
|
'timestamp': int_or_none(video.get('createdAt'), scale=1000),
|
||||||
|
'thumbnail': video.get('thumb'),
|
||||||
}
|
}
|
||||||
|
|
||||||
video_type = video.get('type')
|
video_type = video.get('type')
|
||||||
|
|
Loading…
Reference in a new issue