mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 21:45:02 +03:00
Fixed tiktok extraction
This commit is contained in:
parent
80d88a1331
commit
8a675aec76
@ -15,16 +15,16 @@ def tiktok_download(url, output_dir='.', merge=True, info_only=False, **kwargs):
|
||||
uniqueId = videoData['authorInfos'].get('uniqueId')
|
||||
nickName = videoData['authorInfos'].get('nickName')
|
||||
|
||||
for i, url in enumerate(urls):
|
||||
for i, videoUrl in enumerate(urls):
|
||||
title = '%s [%s]' % (nickName or uniqueId, videoId)
|
||||
if len(urls) > 1:
|
||||
title = '%s [%s]' % (title, i)
|
||||
|
||||
mime, ext, size = url_info(url)
|
||||
mime, ext, size = url_info(videoUrl, headers={'Referer': url})
|
||||
|
||||
print_info(site_info, title, mime, size)
|
||||
if not info_only:
|
||||
download_urls([url], title, ext, size, output_dir=output_dir, merge=merge)
|
||||
download_urls([videoUrl], title, ext, size, output_dir=output_dir, merge=merge, headers={'Referer': url})
|
||||
|
||||
site_info = "TikTok.com"
|
||||
download = tiktok_download
|
||||
|
Loading…
Reference in New Issue
Block a user