From 8a675aec761f5c7b3c27084f62ad7a0c851310a2 Mon Sep 17 00:00:00 2001 From: Doug Benham Date: Fri, 18 Sep 2020 14:25:38 -0700 Subject: [PATCH] Fixed tiktok extraction --- src/you_get/extractors/tiktok.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/you_get/extractors/tiktok.py b/src/you_get/extractors/tiktok.py index c2a0eb8d..4843ced8 100644 --- a/src/you_get/extractors/tiktok.py +++ b/src/you_get/extractors/tiktok.py @@ -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