mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-03-09 12:50:23 -05:00
fix tests
This commit is contained in:
parent
4f1e049644
commit
7d0afa2246
1 changed files with 7 additions and 17 deletions
|
@ -6,6 +6,7 @@
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
int_or_none,
|
int_or_none,
|
||||||
|
make_archive_id,
|
||||||
mimetype2ext,
|
mimetype2ext,
|
||||||
parse_resolution,
|
parse_resolution,
|
||||||
str_or_none,
|
str_or_none,
|
||||||
|
@ -103,6 +104,7 @@ def _parse_video_info(self, video_info, video_id=None):
|
||||||
'extractor': WeiboIE.IE_NAME,
|
'extractor': WeiboIE.IE_NAME,
|
||||||
'formats': self._extract_formats(video_info),
|
'formats': self._extract_formats(video_info),
|
||||||
'http_headers': {'Referer': 'https://weibo.com/'},
|
'http_headers': {'Referer': 'https://weibo.com/'},
|
||||||
|
'_old_archive_ids': [make_archive_id('WeiboMobile', video_id)],
|
||||||
**traverse_obj(video_info, {
|
**traverse_obj(video_info, {
|
||||||
'id': (('id', 'id_str', 'mid'), {str_or_none}),
|
'id': (('id', 'id_str', 'mid'), {str_or_none}),
|
||||||
'display_id': ('mblogid', {str_or_none}),
|
'display_id': ('mblogid', {str_or_none}),
|
||||||
|
@ -130,9 +132,11 @@ class WeiboIE(WeiboBaseIE):
|
||||||
'url': 'https://weibo.com/7827771738/N4xlMvjhI',
|
'url': 'https://weibo.com/7827771738/N4xlMvjhI',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '4910815147462302',
|
'id': '4910815147462302',
|
||||||
|
'_old_archive_ids': ['weibomobile None'],
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'display_id': 'N4xlMvjhI',
|
'display_id': 'N4xlMvjhI',
|
||||||
'title': '【睡前消息暑假版第一期:拉泰国一把 对中国有好处】',
|
'title': '【睡前消息暑假版第一期:拉泰国一把 对中国有好处】',
|
||||||
|
'alt_title': '【睡前消息暑假版第一期:拉泰国一把 对中国有好处】',
|
||||||
'description': 'md5:e2637a7673980d68694ea7c43cf12a5f',
|
'description': 'md5:e2637a7673980d68694ea7c43cf12a5f',
|
||||||
'duration': 918,
|
'duration': 918,
|
||||||
'timestamp': 1686312819,
|
'timestamp': 1686312819,
|
||||||
|
@ -150,9 +154,11 @@ class WeiboIE(WeiboBaseIE):
|
||||||
'url': 'https://m.weibo.cn/status/4189191225395228',
|
'url': 'https://m.weibo.cn/status/4189191225395228',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '4189191225395228',
|
'id': '4189191225395228',
|
||||||
|
'_old_archive_ids': ['weibomobile None'],
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'display_id': 'FBqgOmDxO',
|
'display_id': 'FBqgOmDxO',
|
||||||
'title': '柴犬柴犬的秒拍视频',
|
'title': '柴犬柴犬的秒拍视频',
|
||||||
|
'alt_title': '柴犬柴犬的秒拍视频',
|
||||||
'description': 'md5:80f461ab5cdae6bbdb70efbf5a1db24f',
|
'description': 'md5:80f461ab5cdae6bbdb70efbf5a1db24f',
|
||||||
'duration': 53,
|
'duration': 53,
|
||||||
'timestamp': 1514264429,
|
'timestamp': 1514264429,
|
||||||
|
@ -167,23 +173,7 @@ class WeiboIE(WeiboBaseIE):
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
'url': 'https://m.weibo.cn/detail/4189191225395228',
|
'url': 'https://m.weibo.cn/detail/4189191225395228',
|
||||||
'info_dict': {
|
'only_matching': True,
|
||||||
'id': '4189191225395228',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'display_id': 'FBqgOmDxO',
|
|
||||||
'title': '柴犬柴犬的秒拍视频',
|
|
||||||
'description': 'md5:80f461ab5cdae6bbdb70efbf5a1db24f',
|
|
||||||
'duration': 53,
|
|
||||||
'timestamp': 1514264429,
|
|
||||||
'upload_date': '20171226',
|
|
||||||
'thumbnail': r're:https://.*\.jpg',
|
|
||||||
'uploader': '柴犬柴犬',
|
|
||||||
'uploader_id': '5926682210',
|
|
||||||
'uploader_url': 'https://weibo.com/u/5926682210',
|
|
||||||
'view_count': int,
|
|
||||||
'like_count': int,
|
|
||||||
'repost_count': int,
|
|
||||||
},
|
|
||||||
}, {
|
}, {
|
||||||
'url': 'https://weibo.com/0/4224132150961381',
|
'url': 'https://weibo.com/0/4224132150961381',
|
||||||
'note': 'no playback_list example',
|
'note': 'no playback_list example',
|
||||||
|
|
Loading…
Reference in a new issue