question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tiktok Failed to parse JSON

See original GitHub issue

Checklist

Region

USA

Description

Tiktok not working, yt-dlp version I am using is a freshly compiled version from the latest master. I saw the other issue saying the fix was included in the latest master but I am still getting this issue.

Verbose log

c:\>yt-dlp --verbose https://www.tiktok.com/@therock
[debug] Command-line config: ['--verbose', 'https://www.tiktok.com/@therock']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, err utf-8, pref cp1252
[debug] yt-dlp version 2021.12.27 [6223f67a8] (win_exe)
[debug] Lazy loading extractors is disabled
[debug] Python version 3.10.0 (CPython 64bit) - Windows-10-10.0.19042-SP0
[debug] exe versions: ffmpeg 4.2.3
[debug] Optional libraries: Cryptodome, mutagen, sqlite, websockets
[debug] Proxy map: {}
[debug] [tiktok:user] Extracting URL: https://www.tiktok.com/@therock
[tiktok:user] therock: Downloading webpage
[download] Downloading playlist: therock
[tiktok:user] therock: Downloading user video list page 1
WARNING: [tiktok:user] Expecting value: line 1 column 1 (char 0). Retrying...
[tiktok:user] therock: Downloading user video list page 1 (attempt 1)
WARNING: [tiktok:user] Expecting value: line 1 column 1 (char 0). Retrying...
[tiktok:user] therock: Downloading user video list page 1 (attempt 2)
WARNING: [tiktok:user] Expecting value: line 1 column 1 (char 0). Retrying...
[tiktok:user] therock: Downloading user video list page 1 (attempt 3)
ERROR: therock: 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 . Make sure you are using the latest version; type  yt-dlp -U  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 990, in _parse_json
  File "json\__init__.py", line 346, in loads
  File "json\decoder.py", line 337, in decode
  File "json\decoder.py", line 355, in raw_decode
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
  File "yt_dlp\extractor\common.py", line 990, in _parse_json
  File "json\__init__.py", line 346, in loads
  File "json\decoder.py", line 337, in decode
  File "json\decoder.py", line 355, in raw_decode
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 1365, in wrapper
  File "yt_dlp\YoutubeDL.py", line 1652, in <lambda>
  File "yt_dlp\utils.py", line 2729, in __getitem__
  File "yt_dlp\extractor\tiktok.py", line 500, in _entries_api
  File "yt_dlp\extractor\tiktok.py", line 75, in _call_api
  File "yt_dlp\extractor\common.py", line 979, in _download_json
  File "yt_dlp\extractor\common.py", line 965, in _download_json_handle
  File "yt_dlp\extractor\common.py", line 994, in _parse_json
yt_dlp.utils.ExtractorError: therock: 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 . Make sure you are using the latest version; type  yt-dlp -U  to update. Be sure to call yt-dlp with the --verbose flag and include its complete output.

[tiktok:user] playlist therock: Downloading 0 videos
[download] Finished downloading playlist: therock

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
MinePlayersPEcommented, Jan 7, 2022

@Janitsu You are running from release, not master

1reaction
Bay40kcommented, Jan 7, 2022

@darktrend Thanks for this, was having same issue and just force reinstalled from master branch

Read more comments on GitHub >

github_iconTop Results From Across the Web

[tiktok:user] Failed to parse JSON #3776 - yt-dlp/yt-dlp - GitHub
Go to redraskal's fork of yt-dlp, and then either git clone it and checkout the fix/tiktok-user branch, or select the same branch from...
Read more >
[tiktok:user] Failed to parse JSON · Issue #3776 : r/DataHoarder
TikTok changes lead to User Pages not being downloadable by yt-dlp anymore: [tiktok:user] Failed to parse JSON · Issue #3776 : r/DataHoarder.
Read more >
Error while parsing JSON Response in REST API Post call
I switched to returning a JSON String and then Deserialize the JSON String, it still raises an error "Failed to parse response of...
Read more >
Get User Profile Information - TikTok for Developers
Key. Type. Description ; Content-Type. string. "application/json".
Read more >
TikTok Oauth - Parameter error (Login kit) - Stack Overflow
I am trying to login to my app using tiktok (login kit). ... "<<Client Secret>>", scope: "user.info.basic", token_params: { parse: :json }.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found