mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-27 02:42:30 +00:00
[tiktok] Fix vt.tiktok
URLs
and add test
This commit is contained in:
parent
60f393e48b
commit
49895f062e
@ -1613,7 +1613,7 @@
|
||||
TikTokSoundIE,
|
||||
TikTokEffectIE,
|
||||
TikTokTagIE,
|
||||
TiktokVMIE,
|
||||
TikTokVMIE,
|
||||
DouyinIE,
|
||||
)
|
||||
from .tinypic import TinyPicIE
|
||||
|
@ -820,10 +820,37 @@ def _real_extract(self, url):
|
||||
traverse_obj(render_data, (..., 'aweme', 'detail'), get_all=False), url)
|
||||
|
||||
|
||||
class TiktokVMIE(InfoExtractor):
|
||||
_VALID_URL = r'https?://vm.tiktok.com/(?P<id>\w+)'
|
||||
class TikTokVMIE(InfoExtractor):
|
||||
_VALID_URL = r'https?://(?:vm|vt)\.tiktok\.com/(?P<id>\w+)'
|
||||
IE_NAME = 'vm.tiktok'
|
||||
|
||||
_TESTS = [{
|
||||
'url': 'https://vm.tiktok.com/ZSe4FqkKd',
|
||||
'info_dict': {
|
||||
'id': '7023491746608712966',
|
||||
'ext': 'mp4',
|
||||
'title': 'md5:5607564db90271abbbf8294cca77eddd',
|
||||
'description': 'md5:5607564db90271abbbf8294cca77eddd',
|
||||
'duration': 11,
|
||||
'upload_date': '20211026',
|
||||
'uploader_id': '7007385080558846981',
|
||||
'creator': 'Memes',
|
||||
'artist': 'Memes',
|
||||
'track': 'original sound',
|
||||
'uploader': 'susmandem',
|
||||
'timestamp': 1635284105,
|
||||
'thumbnail': r're:https://.+\.webp.*',
|
||||
'like_count': int,
|
||||
'view_count': int,
|
||||
'comment_count': int,
|
||||
'repost_count': int,
|
||||
'uploader_url': 'https://www.tiktok.com/@MS4wLjABAAAAXcNoOEOxVyBzuII_E--T0MeCrLP0ay1Sm6x_n3dluiWEoWZD0VlQOytwad4W0i0n',
|
||||
}
|
||||
}, {
|
||||
'url': 'https://vt.tiktok.com/ZSe4FqkKd',
|
||||
'only_matching': True,
|
||||
}]
|
||||
|
||||
def _real_extract(self, url):
|
||||
return self.url_result(self._request_webpage(
|
||||
HEADRequest(url), self._match_id(url), headers={'User-Agent': 'facebookexternalhit/1.1'}).geturl(), TikTokIE)
|
||||
|
Loading…
Reference in New Issue
Block a user