[tiktok] JSON parse error
See original GitHub issueChecklist
- I’m reporting a broken site
- I’ve verified that I’m running yt-dlp version 2022.02.04. (update instructions)
- I’ve checked that all provided URLs are alive and playable in a browser
- I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
- I’ve searched the bugtracker for similar issues including closed ones. DO NOT post duplicates
- I’ve read the guidelines for opening an issue
- I’ve read about sharing account credentials and I’m willing to share it if required
Region
US
Description
This is the same-looking bug as #2611, #2135, #2488, #2595, #2534, #2298, and probably others. Was solved by #2449 but this doesn’t seem to be the case anymore, as of earlier today.
I’m guessing new version number? I don’t have the MITM setup that seems to be needed to get them myself, but I can try to put it together if this is going to keep happening.
Verbose log
$ ~/bin/yt-dlp-unstable/yt-dlp/yt-dlp.sh -vU https://www.tiktok.com/@uaptiktok
[debug] Command-line config: ['-vU', 'https://www.tiktok.com/@uaptiktok']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, err utf-8, pref UTF-8
[debug] yt-dlp version 2022.02.04 [c1653e9ef] (source)
[debug] Lazy loading extractors is disabled
[debug] Plugins: ['SamplePluginIE', 'SamplePluginPP']
[debug] Git HEAD: a3125791c
[debug] Python version 3.8.10 (CPython 64bit) - Linux-5.13.0-27-generic-x86_64-with-glibc2.29
[debug] exe versions: ffmpeg 4.2.4, ffprobe 4.2.4, rtmpdump 2.4
[debug] Optional libraries: Cryptodome, secretstorage, sqlite
[debug] Proxy map: {}
Latest version: 2022.02.04, Current version: 2022.02.04
yt-dlp is up to date (2022.02.04)
[debug] [tiktok:user] Extracting URL: https://www.tiktok.com/@uaptiktok
[tiktok:user] uaptiktok: Downloading webpage
[tiktok:user] uaptiktok: Downloading user video list page 1
WARNING: [tiktok:user] Expecting value: line 1 column 1 (char 0). Retrying... (attempt 1 of 5)
[tiktok:user] uaptiktok: Downloading user video list page 1
WARNING: [tiktok:user] Expecting value: line 1 column 1 (char 0). Retrying... (attempt 2 of 5)
[tiktok:user] uaptiktok: Downloading user video list page 1
WARNING: [tiktok:user] Expecting value: line 1 column 1 (char 0). Retrying... (attempt 3 of 5)
[tiktok:user] uaptiktok: Downloading user video list page 1
WARNING: [tiktok:user] Expecting value: line 1 column 1 (char 0). Retrying... (attempt 4 of 5)
[tiktok:user] uaptiktok: Downloading user video list page 1
WARNING: [tiktok:user] Expecting value: line 1 column 1 (char 0). Retrying...
[tiktok:user] uaptiktok: Downloading user video list page 1 (attempt 1)
WARNING: [tiktok:user] Expecting value: line 1 column 1 (char 0). Retrying... (attempt 1 of 5)
[tiktok:user] uaptiktok: Downloading user video list page 1 (attempt 1)
WARNING: [tiktok:user] Expecting value: line 1 column 1 (char 0). Retrying... (attempt 2 of 5)
[tiktok:user] uaptiktok: Downloading user video list page 1 (attempt 1)
WARNING: [tiktok:user] Expecting value: line 1 column 1 (char 0). Retrying... (attempt 3 of 5)
[tiktok:user] uaptiktok: Downloading user video list page 1 (attempt 1)
WARNING: [tiktok:user] Expecting value: line 1 column 1 (char 0). Retrying... (attempt 4 of 5)
[tiktok:user] uaptiktok: Downloading user video list page 1 (attempt 1)
WARNING: [tiktok:user] Expecting value: line 1 column 1 (char 0). Retrying...
[tiktok:user] uaptiktok: Downloading user video list page 1 (attempt 2)
WARNING: [tiktok:user] Expecting value: line 1 column 1 (char 0). Retrying... (attempt 1 of 5)
[tiktok:user] uaptiktok: Downloading user video list page 1 (attempt 2)
WARNING: [tiktok:user] Expecting value: line 1 column 1 (char 0). Retrying... (attempt 2 of 5)
[tiktok:user] uaptiktok: Downloading user video list page 1 (attempt 2)
WARNING: [tiktok:user] Expecting value: line 1 column 1 (char 0). Retrying... (attempt 3 of 5)
[tiktok:user] uaptiktok: Downloading user video list page 1 (attempt 2)
WARNING: [tiktok:user] Expecting value: line 1 column 1 (char 0). Retrying... (attempt 4 of 5)
[tiktok:user] uaptiktok: Downloading user video list page 1 (attempt 2)
WARNING: [tiktok:user] Expecting value: line 1 column 1 (char 0). Retrying...
[tiktok:user] uaptiktok: Downloading user video list page 1 (attempt 3)
WARNING: [tiktok:user] Expecting value: line 1 column 1 (char 0). Retrying... (attempt 1 of 5)
[tiktok:user] uaptiktok: Downloading user video list page 1 (attempt 3)
WARNING: [tiktok:user] Expecting value: line 1 column 1 (char 0). Retrying... (attempt 2 of 5)
[tiktok:user] uaptiktok: Downloading user video list page 1 (attempt 3)
WARNING: [tiktok:user] Expecting value: line 1 column 1 (char 0). Retrying... (attempt 3 of 5)
[tiktok:user] uaptiktok: Downloading user video list page 1 (attempt 3)
WARNING: [tiktok:user] Expecting value: line 1 column 1 (char 0). Retrying... (attempt 4 of 5)
[tiktok:user] uaptiktok: Downloading user video list page 1 (attempt 3)
ERROR: [tiktok:user] uaptiktok: uaptiktok: Failed to parse JSON (caused by JSONDecodeError('Expecting value: line 1 column 1 (char 0)')); please report this issue on https://github.com/yt-dlp/yt-dlp , filling out the "Broken site" issue template properly. Confirm you are on the latest version using -U (caused by JSONDecodeError('Expecting value: line 1 column 1 (char 0)')); please report this issue on https://github.com/yt-dlp/yt-dlp , filling out the "Broken site" issue template properly. Confirm you are on the latest version using -U
File "/home/xxx/bin/yt-dlp-unstable/yt-dlp/yt_dlp/extractor/common.py", line 612, in extract
ie_result = self._real_extract(url)
File "/home/xxx/bin/yt-dlp-unstable/yt-dlp/yt_dlp/extractor/tiktok.py", line 597, in _real_extract
thumbnail = traverse_obj(videos, (0, 'author', 'avatar_larger', 'url_list', 0))
File "/home/xxx/bin/yt-dlp-unstable/yt-dlp/yt_dlp/utils.py", line 5142, in traverse_obj
val = _traverse_obj(obj, path)
File "/home/xxx/bin/yt-dlp-unstable/yt-dlp/yt_dlp/utils.py", line 5128, in _traverse_obj
obj = obj[key]
File "/home/xxx/bin/yt-dlp-unstable/yt-dlp/yt_dlp/utils.py", line 2745, in __getitem__
self.__cache.extend(itertools.islice(self.__iterable, n))
File "/home/xxx/bin/yt-dlp-unstable/yt-dlp/yt_dlp/extractor/tiktok.py", line 566, in _video_entries_api
post_list = self._call_api('aweme/post', query, username,
File "/home/xxx/bin/yt-dlp-unstable/yt-dlp/yt_dlp/extractor/tiktok.py", line 115, in _call_api
raise e
File "/home/xxx/bin/yt-dlp-unstable/yt-dlp/yt_dlp/extractor/tiktok.py", line 108, in _call_api
res = self._call_api_impl(ep, real_query, manifest_app_version, video_id, fatal, note, errnote)
File "/home/xxx/bin/yt-dlp-unstable/yt-dlp/yt_dlp/extractor/tiktok.py", line 45, in _call_api_impl
return self._download_json(
File "/home/xxx/bin/yt-dlp-unstable/yt-dlp/yt_dlp/extractor/common.py", line 992, in _download_json
res = self._download_json_handle(
File "/home/xxx/bin/yt-dlp-unstable/yt-dlp/yt_dlp/extractor/common.py", line 978, in _download_json_handle
return self._parse_json(
File "/home/xxx/bin/yt-dlp-unstable/yt-dlp/yt_dlp/extractor/common.py", line 1007, in _parse_json
raise ExtractorError(errmsg, cause=ve)
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Tik Tok failed to parse JSON in US · Issue #2135 · yt-dlp/yt-dlp
Tik Tok failed to parse JSON in US #2135 ... Description. Tiktok having issues, in the US, using VPN or not it throws...
Read more >Why cant Python request parse TikTok API data?
Why cant Python request parse TikTok API data? · did you try to print the response body before using a JSON decoder? Maybe...
Read more >tiktok - JSON Formatter
Online JSON Parser helps to parse, view, analyze JSON data in Tree View. It's a pretty simple and easy way to parse JSON...
Read more >Get Started with Display API - TikTok for Developers
Display User's TikTok Profile Parse the returned profile information and display it in your UI.
Read more >JSON - Make
Make sure that the JSON content is properly mapped into the Parse JSON module and that the data structure is correctly defined. See...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
TikTok(User)IE inexplicably works now for some reason
Closing since it seems to have fixed itself