Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: [TikTok] : Unable to extract json_string #971

Closed
skynetgroupllc opened this issue Sep 14, 2021 · 3 comments
Closed

ERROR: [TikTok] : Unable to extract json_string #971

skynetgroupllc opened this issue Sep 14, 2021 · 3 comments

Comments

@skynetgroupllc
Copy link

Checklist

  • [ x] I'm reporting a bug unrelated to a specific site
  • [x ] I've verified that I'm running yt-dlp version 2021.09.02
  • [x ] I've checked that all provided URLs are alive and playable in a browser
  • [ x] The provided URLs do not contain any DRM to the best of my knowledge
  • [ x] I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • [x ] I've searched the bugtracker for similar bug reports including closed ones
  • [x ] I've read bugs section in FAQ

Verbose log

[debug] Command-line config: ['-v', 'https://www.tiktok.com/share/video/6850242410719612166/']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252
[debug] yt-dlp version 2021.09.02 (exe)
[debug] Python version 3.8.10 (CPython 64bit) - Windows-10-10.0.17763-SP0
[debug] exe versions: ffmpeg 2021-08-04-git-3b298640e1-full_build-www.gyan.dev, ffprobe 2021-08-04-git-3b298640e1-full_build-www.gyan.dev
[debug] Optional libraries: mutagen, pycryptodome, sqlite, websockets
[debug] Proxy map: {}
[debug] [generic] Extracting URL: https://www.tiktok.com/share/video/6850242410719612166/
[generic] 6850242410719612166: Requesting header
[redirect] Following redirect to https://www.tiktok.com/@_shadowkillaz05_/video/6850242410719612166
[debug] [TikTok] Extracting URL: https://www.tiktok.com/@_shadowkillaz05_/video/6850242410719612166
[TikTok] 6850242410719612166: Downloading webpage
[TikTok] 6850242410719612166: Downloading video webpage
ERROR: [TikTok] 6850242410719612166: Unable to extract json_string; please report this issue on  https://github.com/yt-dlp/yt-dlp . Make sure you are using the latest version; see  https://github.com/yt-dlp/yt-dlp  on how to update. Be sure to call yt-dlp with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "yt_dlp\extractor\common.py", line 584, in extract
  File "yt_dlp\extractor\tiktok.py", line 117, in _real_extract
  File "yt_dlp\extractor\common.py", line 1147, in _search_regex
yt_dlp.utils.RegexNotFoundError: Unable to extract json_string; please report this issue on  https://github.com/yt-dlp/yt-dlp . Make sure you are using the latest version; see  https://github.com/yt-dlp/yt-dlp  on how to update. Be sure to call yt-dlp with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "yt_dlp\extractor\common.py", line 584, in extract
  File "yt_dlp\extractor\tiktok.py", line 117, in _real_extract
  File "yt_dlp\extractor\common.py", line 1147, in _search_regex
yt_dlp.utils.RegexNotFoundError: Unable to extract json_string; please report this issue on  https://github.com/yt-dlp/yt-dlp . Make sure you are using the latest version; see  https://github.com/yt-dlp/yt-dlp  on how to update. Be sure to call yt-dlp with the --verbose flag and include its complete output.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 1214, in wrapper
  File "yt_dlp\YoutubeDL.py", line 1239, in __extract_info
  File "yt_dlp\extractor\common.py", line 600, in extract
yt_dlp.utils.ExtractorError: [TikTok] 6850242410719612166: Unable to extract json_string; please report this issue on  https://github.com/yt-dlp/yt-dlp . Make sure you are using the latest version; see  https://github.com/yt-dlp/yt-dlp  on how to update. Be sure to call yt-dlp with the --verbose flag and include its complete output.

Description

This works perfectly over the weekend. Now, when attempting to access any tiktok video I'm receiving the "unable to extract json_string" error. I had a friend try this from their location as well and received the same error response, so this does not appear to be a block on my end by tiktok.

@liamengland1
Copy link
Contributor

Try latest master, the extractor has been re-designed to use the mobile API.

@nicolaasjan
Copy link

You can try with the latest master branch, as @llacb47 said.
It works (I checked).
Just download the zip file (under the green CODE button) and extract to folder yt-dlp-master.
Then open a command prompt in that folder (type cmd in the address bar and hit enter) and paste in this:
(Python must be installed)

.\yt_dlp\__main__.py https://www.tiktok.com/share/video/6850242410719612166/

C:\Users\Nico\Desktop\yt-dlp-master>.\yt_dlp\__main__.py https://www.tiktok.com/share/video/6850242410719612166/
[generic] 6850242410719612166: Requesting header
[redirect] Following redirect to https://www.tiktok.com/@_shadowkillaz05_/video/6850242410719612166
[TikTok] 6850242410719612166: Downloading video details
[SponsorBlock] SponsorBlock is not supported for TikTok
[info] 6850242410719612166: Downloading 1 format(s): bytevc1_720p_255329-2
[TikTok] 6850242410719612166: Downloading thumbnail  ...
[TikTok] 6850242410719612166: Writing thumbnail to: C:\Users\Nico\Desktop\Part1 #foryou #viral.webp
[download] Destination: C:\Users\Nico\Desktop\Part1 #foryou #viral.mp4
[aria2c] Downloaded 1888222 bytes
[download] 100% of 1.80MiB in 00:00
[ModifyChapters] SponsorBlock information is unavailable
[Metadata] Adding metadata to "C:\Users\Nico\Desktop\Part1 #foryou #viral.mp4"
[ThumbnailsConvertor] Converting thumbnail "C:\Users\Nico\Desktop\Part1 #foryou #viral.webp" to png
[EmbedThumbnail] mutagen: Adding thumbnail to "C:\Users\Nico\Desktop\Part1 #foryou #viral.mp4"
Deleting original file C:\Users\Nico\Desktop\Part1 #foryou #viral.png (pass -k to keep)
Deleting original file C:\Users\Nico\Desktop\Part1 #foryou #viral.webp (pass -k to keep)

Or wait for the next release.

@pukkandan
Copy link
Member

Closing since its already fixed in code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants