yt-dlp: [TikTok] Failed to parse JSON - Can't download videos without watermark

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

  • I understand that I will be blocked if I intentionally remove or skip any mandatory* field

Checklist

Region

Netherlands

Provide a description that is worded well enough to be understood

Yesterday videos without watermarks were downloading fine, but today videos are only downloading with watermarks. I see that there were issues here about “Failed to parse JSON”, but they are all locked and I can’t reply in them.

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • If using API, add 'verbose': True to YoutubeDL params instead
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

[debug] Command-line config: ['https://www.tiktok.com/@elias_filmz/video/7344534749551070506', '-vU']
[debug] Encodings: locale cp1251, fs utf-8, pref cp1251, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version nightly@2024.03.10.232703 from yt-dlp/yt-dlp-nightly-builds [8463fb510] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19044-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg n6.1.1-1-g61b88b4dda-20240118 (setts), ffprobe n6.1.1-1-g61b88b4dda-20240118
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.02.02, mutagen-1.47.0, requests-2.31.0, sqlite3-3.35.5, urllib3-2.2.1, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets
[debug] Loaded 1803 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-nightly-builds/releases/latest
Latest version: nightly@2024.03.10.232703 from yt-dlp/yt-dlp-nightly-builds
yt-dlp is up to date (nightly@2024.03.10.232703 from yt-dlp/yt-dlp-nightly-builds)
[TikTok] Extracting URL: https://www.tiktok.com/@elias_filmz/video/7344534749551070506
[TikTok] 7344534749551070506: Downloading video feed
WARNING: [TikTok] Expecting value in '': line 1 column 1 (char 0). Retrying... (attempt 1 of 4)
[TikTok] 7344534749551070506: Downloading video feed
WARNING: [TikTok] Expecting value in '': line 1 column 1 (char 0). Retrying... (attempt 2 of 4)
[TikTok] 7344534749551070506: Downloading video feed
WARNING: [TikTok] Expecting value in '': line 1 column 1 (char 0). Retrying... (attempt 3 of 4)
[TikTok] 7344534749551070506: Downloading video feed
WARNING: [TikTok] 7344534749551070506: Failed to parse JSON (caused by JSONDecodeError("Expecting value in '': line 1 column 1 (char 0)")); trying with webpage
[TikTok] 7344534749551070506: Downloading webpage
[debug] [TikTok] Found universal data for rehydration
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, size, br, asr, proto, vext, aext, hasaud, source, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] 7344534749551070506: Downloading 1 format(s): download
[debug] Invoking http downloader on "https://v16-webapp-prime.tiktok.com/video/tos/maliva/tos-maliva-ve-0068c799-us/osDtSSfFIBS7HQEH6fRBEHnD5cmYQgX8gRAQFl/?a=1988&ch=0&cr=3&dr=0&lr=tiktok_m&cd=0%7C0%7C1%7C&cv=1&br=1958&bt=979&bti=ODszNWYuMDE6&cs=0&ds=3&ft=-Csk_mIRPD12NTGunf-Ux412SYKW3wv25NcAp&mime_type=video_mp4&qs=0&rc=aWhlNmdoZDM5ZTU2OGY5M0BpM2VoaW05cjRqcTMzZzczNEA1YS4tNWMuXy0xMTYvLS0tYSNqZmRoMmRjYmpgLS1kMS9zcw%3D%3D&btag=e00090000&expire=1710420583&l=20240314064834E1772D870274A3041055&ply_type=2&policy=2&signature=d63e05bc6e4a2807447d63823426f55f&tk=tt_chain_token"
[debug] File locking is not supported. Proceeding without locking
[download] Destination: Trying to eat breakfast with Bruce! #cow #brucethecow #food #snack #first #animals #foodreview  [7344534749551070506].mp4
[download] 100% of    8.15MiB in 00:00:01 at 4.90MiB/s

About this issue

  • Original URL
  • State: closed
  • Created 4 months ago
  • Comments: 16 (3 by maintainers)

Commits related to this issue

Most upvoted comments

@AbdallhMAbd Thanks!

Until this is fixed in master/nightly/stable,

--extractor-args "tiktok:api_hostname=api22-normal-c-useast2a.tiktokv.com"

can be passed to yt-dlp as a workaround

Hi Replace old _API_HOSTNAME with api22-normal-c-useast2a.tiktokv.com

As a temporary workaround -f 0 downloads videos without watermark.

–extractor-args “tiktok:api_hostname=api22-normal-c-useast2a.tiktokv.com” is not working

Hi Replace old _API_HOSTNAME with api22-normal-c-useast2a.tiktokv.com

Seems to work fine from my end. Thanks for the suggestion!

yes now it’s not working --extractor-args “tiktok:api_hostname=api22-normal-c-useast2a.tiktokv.com”

@ThePiousDragon Thanks for this, it does indeed fix the problem.