Repository: yt-dlp/yt-dlp

Issue:
[TikTok] Failed to parse JSON/ No video formats found
### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

- [X] I understand that I will be **blocked** if I *intentionally* remove or skip any mandatory\* field

### Checklist

- [X] I'm asking a question and **not** reporting a bug or requesting a feature
- [X] I've looked through the [README](https://github.com/yt-dlp/yt-dlp#readme)
- [X] I've verified that I have **updated yt-dlp to nightly or master** ([update instructions](https://github.com/yt-dlp/yt-dlp#update-channels))
- [X] I've searched [known issues](https://github.com/yt-dlp/yt-dlp/issues/3766) and the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar questions **including closed ones**. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)

### Please make sure the question is worded well enough to be understood

#### EDIT:

yt-dlp's TikTok extractor is failing to parse JSON from the feed API endpoint even on nightly/master or with passing `--extractor-args "tiktok:api_hostname=api22-normal-c-useast2a.tiktokv.com"`

<details><summary>original log for reference</summary>

```shell
yt-dlp -f "bv*[vcodec^=avc]+ba[ext=m4a]/b[ext=mp4]/b" https://www.tiktok.com/@pouveronica/video/7322479967147740459
[TikTok] Extracting URL: https://www.tiktok.com/@pouveronica/video/7322479967147740459
[TikTok] 7322479967147740459: Downloading video feed
WARNING: [TikTok] Expecting value in '': line 1 column 1 (char 0). Retrying... (attempt 1 of 4)
[TikTok] 7322479967147740459: Downloading video feed
WARNING: [TikTok] Expecting value in '': line 1 column 1 (char 0). Retrying... (attempt 2 of 4)
[TikTok] 7322479967147740459: Downloading video feed
WARNING: [TikTok] Expecting value in '': line 1 column 1 (char 0). Retrying... (attempt 3 of 4)
[TikTok] 7322479967147740459: Downloading video feed
WARNING: [TikTok] 7322479967147740459: Failed to parse JSON (caused by JSONDecodeError("Expecting value in '': line 1 column 1 (char 0)")); trying with webpage
[TikTok] 7322479967147740459: Downloading webpage
[info] 7322479967147740459: Downloading 1 format(s): download
ERROR: unable to open for writing: [Errno 2] No such file or directory: 'Replying to @Vy Puthny some key differences in finance and accounting 😃  #hr #humanresources #hrinsight #hrrole #hrtips #hrtrend #hrknowledge #learning #careergrowth #accounting #finance #manpoweroutsourcing #eor  @Nica - និកា  [7322479967147740459].mp4.part'
```

</details>

### Provide verbose output that clearly demonstrates the problem

- [X] 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

```shell
[debug] Command-line config: ['-v', '-U', '-o', '%(title).200B.%(ext)s', 'https://www.tiktok.com/@mix_editor_5/video/7342789941371571462']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version master@2024.03.20.232831 from yt-dlp/yt-dlp-master-builds [07f5b2f75] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.22631-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 6.1.1-full_build-www.gyan.dev (setts), ffprobe 6.1.1-full_build-www.gyan.dev, phantomjs 2.5.0, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.02.02, curl_cffi-0.5.10, 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, curl_cffi
[debug] Loaded 1806 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-master-builds/releases/latest
Latest version: master@2024.03.20.232831 from yt-dlp/yt-dlp-master-builds
yt-dlp is up to date (master@2024.03.20.232831 from yt-dlp/yt-dlp-master-builds)
[TikTok] Extracting URL: https://www.tiktok.com/@mix_editor_5/video/7342789941371571462
[TikTok] 7342789941371571462: Downloading video feed
WARNING: [TikTok] Expecting value in '': line 1 column 1 (char 0). Retrying... (attempt 1 of 4)
[TikTok] 7342789941371571462: Downloading video feed
WARNING: [TikTok] Expecting value in '': line 1 column 1 (char 0). Retrying... (attempt 2 of 4)
[TikTok] 7342789941371571462: Downloading video feed
WARNING: [TikTok] Expecting value in '': line 1 column 1 (char 0). Retrying... (attempt 3 of 4)
[TikTok] 7342789941371571462: Downloading video feed
WARNING: [TikTok] 7342789941371571462: Failed to parse JSON (caused by JSONDecodeError("Expecting value in '': line 1 column 1 (char 0)")); trying with webpage
[TikTok] 7342789941371571462: 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] 7342789941371571462: Downloading 1 format(s): download
[debug] Invoking http downloader on "https://v16-webapp-prime.tiktok.com/video/tos/useast2a/tos-useast2a-ve-0068c004/okMCLjLWAqjFQ5CIXaAfaAiMNgbSzfFCh48fSV/?a=1988&ch=0&cr=3&dr=0&lr=tiktok_m&cd=0%7C0%7C1%7C&cv=1&br=1800&bt=900&bti=ODszNWYuMDE6&cs=0&ds=3&ft=4fUEKMFx8Zmo0H.5Y94jV..7rpWrKsd.&mime_type=video_mp4&qs=0&rc=NGQ5OTY1NTdnaDM0Ojs1ZUBpMzs4N3Q5cnlncTMzNzczM0AzLi9gMi4vNjUxX14uLV4yYSNqZWpoMmQ0NWdgLS1kMTZzcw%3D%3D&btag=e00088000&expire=1711056619&l=20240321153003FA72D5DD8E2EFA514E6F&ply_type=2&policy=2&signature=eb207c9a24f5509f1e4668cbac840d00&tk=tt_chain_token"
[debug] File locking is not supported. Proceeding without locking
[download] Destination: #CapCut #🥺💔 #new #trending #plz #plz #😭😭 #viralvideo #plunfrezzmyaccount🙏🥺 #plzvirulvideo😥 #plzviral🥺🥺🙏🙏foryoupage ⧸⧸ 𝑫𝒆𝒂𝒓 𝑻𝒊𝒌𝒕𝒐𝒌 𝑻.mp4
[download] 100% of    1.62MiB in 00:00:00 at 14.79MiB/s
```


Discussion:
i have the latest nightly build version and facing this problem


 yt-dlp --cookies '5.txt' 'https://www.tiktok.com/@mix_editor_5/video/7342789941371571462?is_from_webapp=1&sender_device=pc'
[TikTok] Extracting URL: https://www.tiktok.com/@mix_editor_5/video/7342789941371571462?is_from_webapp=1&sender_device=pc
[TikTok] 7342789941371571462: Downloading video feed
WARNING: [TikTok] Expecting value in '': line 1 column 1 (char 0). Retrying... (attempt 1 of 4)
[TikTok] 7342789941371571462: Downloading video feed
WARNING: [TikTok] Expecting value in '': line 1 column 1 (char 0). Retrying... (attempt 2 of 4)
[TikTok] 7342789941371571462: Downloading video feed
WARNING: [TikTok] Expecting value in '': line 1 column 1 (char 0). Retrying... (attempt 3 of 4)
[TikTok] 7342789941371571462: Downloading video feed
WARNING: [TikTok] 7342789941371571462: Failed to parse JSON (caused by JSONDecodeError("Expecting value in '': line 1 column 1 (char 0)")); trying with webpage
[TikTok] 7342789941371571462: Downloading webpage
[info] 7342789941371571462: Downloading 1 format(s): download
[download] Unable to open file: [Errno 22] Invalid argument: "#CapCut #🥺💔 #new #trending #plz #plz #😭😭 #viralvideo #plunfrezzmyaccount🙏🥺 #plzvirulvideo😥 #plzviral🥺🥺🙏🙏foryoupage ⧸⧸ 𝑫𝒆𝒂𝒓 𝑻𝒊𝒌𝒕𝒐𝒌 𝑻𝒆𝒂𝒎 𝑷𝒍𝒛 𝑫𝒐𝒏'𝒕 𝑼𝒏𝒅𝒆𝒓𝒓𝒆𝒗𝒊𝒆𝒘 𝑴𝒚 𝑽𝒊𝒅𝒆𝒐  🥺🙏😞💔 ⧸⧸#FORYOU #FORYOUPAGE#STANDWITHKASHMIR#dontunderreviewmyvideo #watsappstatus  [7342789941371571462].mp4.part". Retrying (1/3)...
[download] Unable to open file: [Errno 22] Invalid argument: "#CapCut #🥺💔 #new #trending #plz #plz #😭😭 #viralvideo #plunfrezzmyaccount🙏🥺 #plzvirulvideo😥 #plzviral🥺🥺🙏🙏foryoupage ⧸⧸ 𝑫𝒆𝒂𝒓 𝑻𝒊𝒌𝒕𝒐𝒌 𝑻𝒆𝒂𝒎 𝑷𝒍𝒛 𝑫𝒐𝒏'𝒕 𝑼𝒏𝒅𝒆𝒓𝒓𝒆𝒗𝒊𝒆𝒘 𝑴𝒚 𝑽𝒊𝒅𝒆𝒐  🥺🙏😞💔 ⧸⧸#FORYOU #FORYOUPAGE#STANDWITHKASHMIR#dontunderreviewmyvideo #watsappstatus  [7342789941371571462].mp4.part". Retrying (2/3)...
[download] Unable to open file: [Errno 22] Invalid argument: "#CapCut #🥺💔 #new #trending #plz #plz #😭😭 #viralvideo #plunfrezzmyaccount🙏🥺 #plzvirulvideo😥 #plzviral🥺🥺🙏🙏foryoupage ⧸⧸ 𝑫𝒆𝒂𝒓 𝑻𝒊𝒌𝒕𝒐𝒌 𝑻𝒆𝒂𝒎 𝑷𝒍𝒛 𝑫𝒐𝒏'𝒕 𝑼𝒏𝒅𝒆𝒓𝒓𝒆𝒗𝒊𝒆𝒘 𝑴𝒚 𝑽𝒊𝒅𝒆𝒐  🥺🙏😞💔 ⧸⧸#FORYOU #FORYOUPAGE#STANDWITHKASHMIR#dontunderreviewmyvideo #watsappstatus  [7342789941371571462].mp4.part". Retrying (3/3)...
ERROR: unable to open for writing: [Errno 22] Invalid argument: "#CapCut #🥺💔 #new #trending #plz #plz #😭😭 #viralvideo #plunfrezzmyaccount🙏🥺 #plzvirulvideo😥 #plzviral🥺🥺🙏🙏foryoupage ⧸⧸ 𝑫𝒆𝒂𝒓 𝑻𝒊𝒌𝒕𝒐𝒌 𝑻𝒆𝒂𝒎 𝑷𝒍𝒛 𝑫𝒐𝒏'𝒕 𝑼𝒏𝒅𝒆𝒓𝒓𝒆𝒗𝒊𝒆𝒘 𝑴𝒚 𝑽𝒊𝒅𝒆𝒐 🥺🙏😞💔 ⧸⧸#FORYOU #FORYOUPAGE#STANDWITHKASHMIR#dontunderreviewmyvideo #watsappstatus  [7342789941371571462].mp4.part"
nobody can share a verbose log?
> yt-dlp --cookies '5.txt' '[https://www.tiktok.com/@mix_editor_5/video/7342789941371571462](https://www.tiktok.com/@mix_editor_5/video/7342789941371571462?is_from_webapp=1&sender_device=pc)

Here's with traffic - or would you need some further debug prints around the problematic areas where the parser fails?

<details><summary>--print-traffic log</summary>

```
yt-dlp --print-traffic https://www.tiktok.com/@mix_editor_5/video/7342789941371571462
[TikTok] Extracting URL: https://www.tiktok.com/@mix_editor_5/video/7342789941371571462
[TikTok] 7342789941371571462: Downloading video feed
director: Handler preferences for this request: urllib=0, requests=100, websockets=0
director: Checking if "requests" supports this request.
director: Sending request via "requests"
requests: Starting new HTTPS connection (1): api22-normal-c-useast2a.tiktokv.com:443
send: b'GET /aweme/v1/feed/?aweme_id=7342789941371571462&version_name=26.1.3&version_code=260103&build_number=26.1.3&manifest_version_code=260103&update_version_code=260103&openudid=a278b796c4075c4f&uuid=3521220805091347&_rticket=1711034124680&ts=1711034124&device_brand=Google&device_type=Pixel+7&device_platform=android&resolution=1080%2A2400&dpi=420&os_version=13&os_api=29&carrier_region=US&sys_region=US&region=US&app_name=trill&app_language=en&language=en&timezone_name=America%2FNew_York&timezone_offset=-14400&channel=googleplay&ac=wifi&mcc_mnc=310260&is_my_cn=0&aid=1180&ssmix=a&as=a1qwert123&cp=cbfhckdckkde1 HTTP/1.1\r\nHost: api22-normal-c-useast2a.tiktokv.com\r\nConnection: keep-alive\r\nUser-Agent: com.ss.android.ugc.trill/260103 (Linux; U; Android 13; en_US; Pixel 7; Build/TD1A.220804.031; Cronet/58.0.2991.0)\r\nAccept: application/json\r\nAccept-Language: en-us,en;q=0.5\r\nSec-Fetch-Mode: navigate\r\nAccept-Encoding: gzip, deflate, br\r\nCookie: odin_tt=e21c6b4bc8a8e90409e1ea0752bb9e5aa15483da4046b7489d8653d12d520bde875aef007630ebcf5b3f49f69b50acb636a86e48df5e95e0c94e7dfab1484524594cb325f3a1efbbf95722eaf5cc91da\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Date: Thu, 21 Mar 2024 15:15:25 GMT
header: Content-Type: application/json
header: Content-Length: 0
header: tt_stable: 1
header: tt_orcas_res: 1
header: x-tt-logid: 2024032115152407E836C61AB33B603694
header: tt-idc-switch: 10000@20240321035225
header: Access-Control-Expose-Headers: tt-idc-switch
header: server-timing: inner; dur=12, inner; dur=7
header: x-tt-trace-host: 01a18c0207eb1443e98b5f96c45cf1cd4373b0beb31656d916fb683f620bc0a0520cf0c260bb07ea0bce6ccf0dff603132b52d7f5824e1c91e7e43e0a98b7135c81ac10d25d74301a7eee80f589cff930a28dbc3168891aa304a8db11ab9825e0d
header: x-tt-trace-tag: id=22;cdn-cache=miss
header: x-tt-trace-id: 00-24032115152407E836C61AB33B603694-3A387E66998F413B-00
header: Server: TLB
header: Via: 1.1 google
header: Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
WARNING: [TikTok] Expecting value in '': line 1 column 1 (char 0). Retrying... (attempt 1 of 4)
[TikTok] 7342789941371571462: Downloading video feed
director: Handler preferences for this request: urllib=0, requests=100, websockets=0
director: Checking if "requests" supports this request.
director: Sending request via "requests"
send: b'GET /aweme/v1/feed/?aweme_id=7342789941371571462&version_name=26.1.2&version_code=260102&build_number=26.1.2&manifest_version_code=260102&update_version_code=260102&openudid=062eb56bad513444&uuid=0761932734663454&_rticket=1711034124985&ts=1711034124&device_brand=Google&device_type=Pixel+7&device_platform=android&resolution=1080%2A2400&dpi=420&os_version=13&os_api=29&carrier_region=US&sys_region=US&region=US&app_name=trill&app_language=en&language=en&timezone_name=America%2FNew_York&timezone_offset=-14400&channel=googleplay&ac=wifi&mcc_mnc=310260&is_my_cn=0&aid=1180&ssmix=a&as=a1qwert123&cp=cbfhckdckkde1 HTTP/1.1\r\nHost: api22-normal-c-useast2a.tiktokv.com\r\nConnection: keep-alive\r\nUser-Agent: com.ss.android.ugc.trill/260102 (Linux; U; Android 13; en_US; Pixel 7; Build/TD1A.220804.031; Cronet/58.0.2991.0)\r\nAccept: application/json\r\nAccept-Language: en-us,en;q=0.5\r\nSec-Fetch-Mode: navigate\r\nAccept-Encoding: gzip, deflate, br\r\nCookie: odin_tt=c81b37003864f4074bf472b245cf6d3fc73cc61f87029ff959630d9a07f6b289fbf63d94903dcb2586a28cb676bd92b0a8b055df8d602f42f715b52868d7385ce5b7e8e6dd8cec1ec11bc3a685a0738f\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Date: Thu, 21 Mar 2024 15:15:25 GMT
header: Content-Type: application/json
header: Content-Length: 0
header: tt_stable: 1
header: tt_orcas_res: 1
header: x-tt-logid: 202403211515243AD6D49A723A5732C784
header: tt-idc-switch: 10000@20240321035225
header: Access-Control-Expose-Headers: tt-idc-switch
header: server-timing: inner; dur=17, inner; dur=10
header: x-tt-trace-host: 01a18c0207eb1443e98b5f96c45cf1cd4373b0beb31656d916fb683f620bc0a05251ee12e16f13c76cbbd6e5bd3e5160b1c238937517e2c940eb1539ab06d01a360f336af1a4d926a5da21fa9b17ed422005fbef6ab93f66cfb2cfe6827182d3a6
header: x-tt-trace-tag: id=22;cdn-cache=miss
header: x-tt-trace-id: 00-2403211515243AD6D49A723A5732C784-6628F157A8823DB3-00
header: Server: TLB
header: Via: 1.1 google
header: Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
WARNING: [TikTok] Expecting value in '': line 1 column 1 (char 0). Retrying... (attempt 2 of 4)
[TikTok] 7342789941371571462: Downloading video feed
director: Handler preferences for this request: urllib=0, requests=100, websockets=0
director: Checking if "requests" supports this request.
director: Sending request via "requests"
send: b'GET /aweme/v1/feed/?aweme_id=7342789941371571462&version_name=26.1.1&version_code=260101&build_number=26.1.1&manifest_version_code=260101&update_version_code=260101&openudid=69814748944065e4&uuid=3381622425895293&_rticket=1711034125189&ts=1711034125&device_brand=Google&device_type=Pixel+7&device_platform=android&resolution=1080%2A2400&dpi=420&os_version=13&os_api=29&carrier_region=US&sys_region=US&region=US&app_name=trill&app_language=en&language=en&timezone_name=America%2FNew_York&timezone_offset=-14400&channel=googleplay&ac=wifi&mcc_mnc=310260&is_my_cn=0&aid=1180&ssmix=a&as=a1qwert123&cp=cbfhckdckkde1 HTTP/1.1\r\nHost: api22-normal-c-useast2a.tiktokv.com\r\nConnection: keep-alive\r\nUser-Agent: com.ss.android.ugc.trill/260101 (Linux; U; Android 13; en_US; Pixel 7; Build/TD1A.220804.031; Cronet/58.0.2991.0)\r\nAccept: application/json\r\nAccept-Language: en-us,en;q=0.5\r\nSec-Fetch-Mode: navigate\r\nAccept-Encoding: gzip, deflate, br\r\nCookie: odin_tt=acc0322fb714d841c53466f8e84bfa87cae0da9ffba50dae5402cded9170fcf5a9eb8f23970271e226d4184c54e9a16d2a6586cd6a98dc03389b7f9eec285bfff3e484087954faa4b53fb82e3dd6d63d\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Date: Thu, 21 Mar 2024 15:15:25 GMT
header: Content-Type: application/json
header: Content-Length: 0
header: tt_stable: 1
header: tt_orcas_res: 1
header: x-tt-logid: 20240321151524631C5A08E56FD227A8D2
header: tt-idc-switch: 10000@20240321035225
header: Access-Control-Expose-Headers: tt-idc-switch
header: server-timing: inner; dur=16, inner; dur=9
header: x-tt-trace-host: 01a18c0207eb1443e98b5f96c45cf1cd4373b0beb31656d916fb683f620bc0a0520747c23aba232ed4a1fa91dd81efc2d7760ab5e58d29f9b887d4b018c571de63bf10f30a61eb62e6fb767e4873eb3ac2427bced9d19423067570214e1477239c
header: x-tt-trace-tag: id=22;cdn-cache=miss
header: x-tt-trace-id: 00-240321151524631C5A08E56FD227A8D2-69B93CB981E102DA-00
header: Server: TLB
header: Via: 1.1 google
header: Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
WARNING: [TikTok] Expecting value in '': line 1 column 1 (char 0). Retrying... (attempt 3 of 4)
[TikTok] 7342789941371571462: Downloading video feed
director: Handler preferences for this request: urllib=0, requests=100, websockets=0
director: Checking if "requests" supports this request.
director: Sending request via "requests"
send: b'GET /aweme/v1/feed/?aweme_id=7342789941371571462&version_name=25.6.2&version_code=250602&build_number=25.6.2&manifest_version_code=250602&update_version_code=250602&openudid=1ae36d04e2456d1d&uuid=2020029002446497&_rticket=1711034125394&ts=1711034125&device_brand=Google&device_type=Pixel+7&device_platform=android&resolution=1080%2A2400&dpi=420&os_version=13&os_api=29&carrier_region=US&sys_region=US&region=US&app_name=trill&app_language=en&language=en&timezone_name=America%2FNew_York&timezone_offset=-14400&channel=googleplay&ac=wifi&mcc_mnc=310260&is_my_cn=0&aid=1180&ssmix=a&as=a1qwert123&cp=cbfhckdckkde1 HTTP/1.1\r\nHost: api22-normal-c-useast2a.tiktokv.com\r\nConnection: keep-alive\r\nUser-Agent: com.ss.android.ugc.trill/250602 (Linux; U; Android 13; en_US; Pixel 7; Build/TD1A.220804.031; Cronet/58.0.2991.0)\r\nAccept: application/json\r\nAccept-Language: en-us,en;q=0.5\r\nSec-Fetch-Mode: navigate\r\nAccept-Encoding: gzip, deflate, br\r\nCookie: odin_tt=8261b6f69ac3f90fbce1fdeaed3ab7f4f8274a468bf03af6f33b0895138cbe778c8ca35d7efbef921a460488856d400a2b3099e06cc8819c0dee6cf4a6f15ce1b8c4d4f34d54111caf9bb2a959fe7d98\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Date: Thu, 21 Mar 2024 15:15:25 GMT
header: Content-Type: application/json
header: Content-Length: 0
header: tt_stable: 1
header: tt_orcas_res: 1
header: x-tt-logid: 202403211515247AE03E3D7D5F1F1E54D0
header: tt-idc-switch: 10000@20240321035225
header: Access-Control-Expose-Headers: tt-idc-switch
header: server-timing: inner; dur=12, inner; dur=6
header: x-tt-trace-host: 01a18c0207eb1443e98b5f96c45cf1cd4373b0beb31656d916fb683f620bc0a052bd661ba389b58c5afd0cacc2aa65725f6af3c3ea880e49c2fee06bfd45b0f9be302a9179399f8415cbbcacbb54717fe048b8518411d1c22f4792a401fd89608d
header: x-tt-trace-tag: id=22;cdn-cache=miss
header: x-tt-trace-id: 00-2403211515247AE03E3D7D5F1F1E54D0-7273C6018925BA71-00
header: Server: TLB
header: Via: 1.1 google
header: Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
WARNING: [TikTok] 7342789941371571462: Failed to parse JSON (caused by JSONDecodeError("Expecting value in '': line 1 column 1 (char 0)")); trying with webpage
[TikTok] 7342789941371571462: Downloading webpage
director: Handler preferences for this request: urllib=0, requests=100, websockets=0
director: Checking if "requests" supports this request.
director: Sending request via "requests"
requests: Starting new HTTPS connection (1): www.tiktok.com:443
send: b'GET /@mix_editor_5/video/7342789941371571462 HTTP/1.1\r\nHost: www.tiktok.com\r\nConnection: keep-alive\r\nUser-Agent: Mozilla/5.0\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-us,en;q=0.5\r\nSec-Fetch-Mode: navigate\r\nAccept-Encoding: gzip, deflate, br\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Type: text/html; charset=utf-8
header: Content-Security-Policy: script-src 'unsafe-eval' sf16-website-login.neutral.ttwstatic.com s20.tiktokcdn.com *.tiktokcdn-us.com www.google.com recaptcha.google.com js.hcaptcha.com client-api.arkoselabs.com www.gstatic.com connect.facebook.net; frame-src *.tiktok.com accounts.google.com www.google.com recaptcha.google.com www.facebook.com *.kakao.com lf16-web.tiktokcdn.com assets.braintreegateway.com appleid.apple.com access.line.me api.twitter.com h.online-metrix.net bytedance: newassets.hcaptcha.com client-api.arkoselabs.com; worker-src https: blob:; report-to csp-endpoint; upgrade-insecure-requests ; default-src 'self' 'unsafe-eval' 'unsafe-inline' blob: bytedance: data: wss://*.tiktok.com wss://*.tiktokv.com wss://*.tiktokv.eu wss://tiktok.com wss://tiktokv.com *.adsco.re *.akamaized.net *.amazonaws.com *.bing.com *.bitssec.com *.bytedapm.com *.bytedgame.com *.bytehwm-row.com *.byteicdn.com *.byteintl.com *.byteintl.net *.byteintlapi.com *.byteintlstatic.com *.bytelemon.com *.byteoversea.com *.byteoversea.net *.bytevcloudapi.com *.capcut.com *.cloudflare.com *.ctfassets.net *.doubleclick.net *.facebook.com *.facebook.net *.fbsbx.com *.fcdnstatic-intl.com *.fdmstatic.com *.g-p-static.com *.gauthmath.com *.goofy-cdn.com *.goofy.app *.google-analytics.com *.google.ae *.google.at *.google.be *.google.bg *.google.bj *.google.by *.google.ca *.google.ch *.google.co.cr *.google.co.id *.google.co.il *.google.co.jp *.google.co.kr *.google.co.ma *.google.co.nz *.google.co.uk *.google.co.za *.google.com *.google.com.ar *.google.com.au *.google.com.bd *.google.com.br *.google.com.cy *.google.com.do *.google.com.ec *.google.com.gh *.google.com.lb *.google.com.mt *.google.com.my *.google.com.ng *.google.com.pe *.google.com.pk *.google.com.sa *.google.com.sg *.google.com.tr *.google.cz *.google.de *.google.dk *.google.dz *.google.ee *.google.es *.google.fi *.google.fr *.google.gr *.google.hr *.google.hu *.google.ie *.google.iq *.google.is *.google.it *.google.lt *.google.lu *.google.lv *.google.md *.google.nl *.google.no *.google.pl *.google.ps *.google.pt *.google.ro *.google.rs *.google.se *.google.si *.google.sk *.google.td *.google.tn *.googleapis.com *.googletagmanager.com *.gstatic.com *.hsforms.com *.hsforms.net *.ibytedtos.com *.ibyteimg.com *.isnssdk.com *.jumio.ai *.kakao.com *.lemon8-app.com *.lemon8cdn.com *.licdn.com *.linkedin.com *.muscdn.com *.musical.ly *.oecstatic.com *.omise.co *.pangle-ads.com *.paypal.com *.pipopay.com *.redditstatic.com *.resso.me *.sgsnssdk.com *.soundon.global *.tableau.com *.tiktok.com *.tiktok.ru *.tiktok.vn *.tiktokapis.com *.tiktokcdn-eu.com *.tiktokcdn-in.com *.tiktokcdn-us.com *.tiktokcdn.com *.tiktokforbusinessoutbound.com *.tiktokglobalshop.com *.tiktokmusic.me *.tiktokshop.com *.tiktokstaticb.com *.tiktokus.info *.tiktokv.com *.tiktokv.eu *.tiktokv.us *.tiktokw.eu *.tiktokw.us *.topbuzzcdn.com *.ttlivecdn.com *.ttlstatic.com *.ttwstatic.com *.twitter.com *.vimeo.com *.vodupload.com *.yahoo.co.jp *.yhgfb-static.com *.zhiliaoapp.com code.jquery.com facebook.com i.ticketweb.com images.universe.com media.ticketmaster.eu res.cloudinary.com s1.ticketm.net static-label.frontgatetickets.com t.co tikitoks.com tiktok.com tiktok.ua tiktok.vn tiktokfollowersfree.com tiktokv.com twitter.com unpkg.com; report-uri https://mon-i18n.tiktokv.com/monitor_browser/collect/batch/security/?bid=tiktok_pns&revision=083476f4-8c9d-4a06-a20a-349394c7e1b5
header: Feature-Policy: microphone 'none'; geolocation 'none'
header: Referrer-Policy: strict-origin-when-cross-origin
header: Strict-Transport-Security: max-age=31536000; includeSubdomains
header: X-Bytefaas-Execution-Duration: 259.11
header: X-Bytefaas-Request-Id: 202403211515245C8C1D90AA980B4E6732
header: X-Content-Type-Options: nosniff
header: X-Download-Options: noopen
header: X-Frame-Options: SAMEORIGIN
header: X-Gw-Dst-Psm: serverless.tiktok.desktop
header: X-Ms-Token: mbSf6ar-O8PKlAHRCyP9XHSgTY2A-VM6uXrC5KhIv7UwO7kEt5HGiMGdhumCsOmVYaV1lCGS4DsP-eKEeFqudBd5CzmD_2Nc8_8=
header: X-Powered-By: Goofy Node
header: X-Pumbaa-Web-Avail: 1
header: X-Tt-Logid: 202403211515245C8C1D90AA980B4E6732
header: X-Xss-Protection: 1; mode=block
header: Server-Timing: inner; dur=260
header: x-tt-trace-host: 015f26c1ffc64c474bea5b1456b221b90bd5a5e0f69cdac916a1e685fda56c37596aeb56271d525cb3d3a39333f2278ee707eeae4a22a405eadc25cd4b09a4604566de44f773e4f6e3f1608b2483f7bfcc6f6bfac1a41bb867878a6f57a3e31f33
header: x-tt-trace-id: 00-2403211515245C8C1D90AA980B4E6732-67D7BCC16D36A3A5-00
header: reporting-endpoints: csp-endpoint="https://mon-i18n.tiktokv.com/monitor_browser/collect/batch/security/?bid=tiktok_pns"
header: content-security-policy-report-only: report-uri https://mon-i18n.tiktokv.com/monitor_browser/collect/batch/security/?bid=tiktok_pns&revision=083476f4-8c9d-4a06-a20a-349394c7e1b5;report-to csp-endpoint;default-src 'self' 'unsafe-eval' 'unsafe-inline' blob: bytedance: data: wss://*.tiktok.com wss://*.tiktokv.com wss://*.tiktokv.eu wss://tiktok.com wss://tiktokv.com *.adsco.re *.akamaized.net *.amazonaws.com *.bing.com *.capcut.com *.cloudflare.com *.ctfassets.net *.doubleclick.net *.facebook.com *.facebook.net *.fbsbx.com *.fcdnstatic-intl.com *.fdmstatic.com *.g-p-static.com *.gauthmath.com *.google-analytics.com *.googleapis.com *.googletagmanager.com *.gstatic.com *.jumio.ai *.kakao.com *.lemon8-app.com *.lemon8cdn.com *.licdn.com *.linkedin.com *.muscdn.com *.musical.ly *.oecstatic.com *.omise.co *.pangle-ads.com *.paypal.com *.pipopay.com *.redditstatic.com *.resso.me *.sgsnssdk.com *.soundon.global *.tableau.com *.tiktok.com *.tiktok.ru *.tiktok.vn *.tiktokapis.com *.tiktokcdn-eu.com *.tiktokcdn-in.com *.tiktokcdn-us.com *.tiktokcdn.com *.tiktokforbusinessoutbound.com *.tiktokglobalshop.com *.tiktokmusic.me *.tiktokshop.com *.tiktokstaticb.com *.tiktokus.info *.tiktokv.com *.tiktokv.eu *.tiktokv.us *.tiktokw.eu *.tiktokw.us *.topbuzzcdn.com *.ttlivecdn.com *.ttlstatic.com *.ttwstatic.com *.twitter.com *.vimeo.com *.yahoo.co.jp facebook.com t.co tikitoks.com tiktok.com tiktok.ua tiktok.vn tiktokfollowersfree.com tiktokv.com twitter.com unpkg.com
header: Server: TLB
header: Content-Encoding: br
header: Expires: Thu, 21 Mar 2024 15:15:26 GMT
header: Cache-Control: max-age=0, no-cache, no-store
header: Pragma: no-cache
header: Date: Thu, 21 Mar 2024 15:15:26 GMT
header: Transfer-Encoding: chunked
header: X-Cache: TCP_MISS from a23-193-116-188.deploy.akamaitechnologies.com (AkamaiGHost/11.4.3-54729273) (-)
header: Connection: keep-alive
header: Connection: Transfer-Encoding
header: Set-Cookie: ttwid=1%7CerEP1e6NThhY6rk-sIqNOiJJf5pFfn6iZ2NqegIFnXM%7C1711034126%7Cfd2425f5cbe4959d725676d147653762c0b6b1d926993a1ce8365d6a199e882f; Domain=.tiktok.com; Path=/; Expires=Sun, 16 Mar 2025 15:15:26 GMT; HttpOnly
header: Set-Cookie: tt_csrf_token=YLGqKfoa-FROEMRRykhf4FqzXeIxM_PDafpw; path=/; domain=.tiktok.com; samesite=lax; secure; httponly
header: Set-Cookie: tt_chain_token=Srpv1GqLrXwj9vmuSLFCZw==; path=/; expires=Tue, 17 Sep 2024 15:15:26 GMT; domain=.tiktok.com; secure; httponly
header: Set-Cookie: msToken=mbSf6ar-O8PKlAHRCyP9XHSgTY2A-VM6uXrC5KhIv7UwO7kEt5HGiMGdhumCsOmVYaV1lCGS4DsP-eKEeFqudBd5CzmD_2Nc8_8=; Path=/; Expires=Sun, 31 Mar 2024 15:15:25 GMT; Secure; SameSite=None
header: x-tt-trace-tag: id=16;cdn-cache=miss;type=dyn
header: Server-Timing: cdn-cache; desc=MISS, edge; dur=0, origin; dur=347
header: X-Origin-Response-Time: 347,23.193.116.188
header: X-Akamai-Request-ID: 23ea698d
[info] 7342789941371571462: Downloading 1 format(s): download
director: Handler preferences for this request: urllib=0, requests=100, websockets=0
director: Checking if "requests" supports this request.
director: Sending request via "requests"
requests: Starting new HTTPS connection (1): v16-webapp-prime.tiktok.com:443
send: b'GET /video/tos/useast2a/tos-useast2a-ve-0068c004/okMCLjLWAqjFQ5CIXaAfaAiMNgbSzfFCh48fSV/?a=1988&ch=0&cr=3&dr=0&lr=tiktok_m&cd=0%7C0%7C1%7C&cv=1&br=1800&bt=900&bti=ODszNWYuMDE6&cs=0&ds=3&ft=4fUEKMFw8Zmo0D4~Y94jVe2xrpWrKsd.&mime_type=video_mp4&qs=0&rc=NGQ5OTY1NTdnaDM0Ojs1ZUBpMzs4N3Q5cnlncTMzNzczM0AzLi9gMi4vNjUxX14uLV4yYSNqZWpoMmQ0NWdgLS1kMTZzcw%3D%3D&btag=e00088000&expire=1711055740&l=202403211515245C8C1D90AA980B4E6732&ply_type=2&policy=2&signature=b6dddab574fbeeacf324e30b741818ae&tk=tt_chain_token HTTP/1.1\r\nHost: v16-webapp-prime.tiktok.com\r\nConnection: keep-alive\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-us,en;q=0.5\r\nSec-Fetch-Mode: navigate\r\nAccept-Encoding: identity\r\nReferer: https://www.tiktok.com/@mix_editor_5/video/7342789941371571462\r\nCookie: ttwid=1%7CerEP1e6NThhY6rk-sIqNOiJJf5pFfn6iZ2NqegIFnXM%7C1711034126%7Cfd2425f5cbe4959d725676d147653762c0b6b1d926993a1ce8365d6a199e882f; tt_csrf_token=YLGqKfoa-FROEMRRykhf4FqzXeIxM_PDafpw; tt_chain_token=Srpv1GqLrXwj9vmuSLFCZw==\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Type: video/mp4
header: Content-Length: 1703033
header: ETag: "c23977362524001dfce3a1ecb4dab423"
header: Last-Modified: Tue, 05 Mar 2024 08:15:20 GMT
header: X-Bdcdn-Cache-Status: TCP_HIT
header: X-Storagegw-Request-Id: 20240320183244A2E1BB648F3C04BF65BE
header: X-Storagegw-Response-Time: Wed, 20 Mar 2024 18:32:45 GMT
header: x-request-ip: fdbd:dc61:b:377::41
header: x-response-cinfo: fdbd:dc61:b:377::41
header: x-tt-trace-host: 01a77528bca0d1d95a185688d3d98daf71848bd655a19706a6446dae8bf4042c558e2596990db3c60c2a38c933d77f50b3b2a6b99c547e5c85b115a6de0d209bdf316676394e095703b7c3009169ca7513c9ae4c4fa86361fcd22b75c2f5cc6b5a9948ef49c9795645653983d2c2ba9fe5d7633064c9c34e024adee0d726671f6b
header: x-tt-trace-id: 00-240321100910A83962CC291EA9D3D9DE-5C215D7287A6ED38-00
header: Server: TLB
header: X-TT-LOGID: 20240321100910A83962CC291EA9D3D9DE
header: X-Expires-MS: 1711015752267
header: X-Origin-Response-Time: 11,23.193.39.145
header: X-Akamai-Request-ID: f0f05a1.2c03ca59.2e0d840
header: X-Parent-Response-Time: 414,23.55.160.136
header: Cache-Control: max-age=2592000
header: Date: Thu, 21 Mar 2024 15:15:27 GMT
header: X-Cache: TCP_MISS from a2-16-63-21.deploy.akamaitechnologies.com (AkamaiGHost/11.4.3-54729273) (-)
header: Connection: keep-alive
header: X-Cache-Remote: TCP_MISS from a23-55-160-136.deploy.akamaitechnologies.com (AkamaiGHost/11.4.3-54726453) (-)
header: x-response-cache: parent_hit
header: x-tt-trace-tag: id=16;cdn-cache=hit;type=static
header: Server-Timing: cdn-cache; desc=HIT, edge; dur=457, origin; dur=0
header: Server-Timing: inner; dur=2
header: X-Parent-Response-Time: 457,2.16.63.21
header: Access-Control-Expose-Headers: Content-Length,Content-Range,content-type,expires,last-modified,via,X-Cache,x-response-cache,x-response-sinfo,x-response-cinfo
header: Accept-Ranges: bytes
header: Access-Control-Allow-Headers: range
header: Access-Control-Allow-Credentials: true
header: Access-Control-Allow-Origin: https://www.tiktok.com
ERROR: unable to open for writing: [Errno 36] File name too long: "#CapCut #🥺💔 #new #trending #plz #plz #😭😭 #viralvideo #plunfrezzmyaccount🙏🥺 #plzvirulvideo😥 #plzviral🥺🥺🙏🙏foryoupage ⧸⧸ 𝑫𝒆𝒂𝒓 𝑻𝒊𝒌𝒕𝒐𝒌 𝑻𝒆𝒂𝒎 𝑷𝒍𝒛 𝑫𝒐𝒏'𝒕 𝑼𝒏𝒅𝒆𝒓𝒓𝒆𝒗𝒊𝒆𝒘 𝑴𝒚 𝑽𝒊𝒅𝒆𝒐 🥺🙏😞💔 ⧸⧸#FORYOU #FORYOUPAGE#STANDWITHKASHMIR#dontunderreviewmyvideo #watsappstatus  [7342789941371571462].mp4.part"

```

</details>
You get a verbose log by adding `--verbose` (or `-v` for short) to your command:
```
[debug] Command-line config: ['-v', '-U', '-o', '%(title).200B.%(ext)s', 'https://www.tiktok.com/@mix_editor_5/video/7342789941371571462']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version master@2024.03.20.232831 from yt-dlp/yt-dlp-master-builds [07f5b2f75] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.22631-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 6.1.1-full_build-www.gyan.dev (setts), ffprobe 6.1.1-full_build-www.gyan.dev, phantomjs 2.5.0, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.02.02, curl_cffi-0.5.10, 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, curl_cffi
[debug] Loaded 1806 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-master-builds/releases/latest
Latest version: master@2024.03.20.232831 from yt-dlp/yt-dlp-master-builds
yt-dlp is up to date (master@2024.03.20.232831 from yt-dlp/yt-dlp-master-builds)
[TikTok] Extracting URL: https://www.tiktok.com/@mix_editor_5/video/7342789941371571462
[TikTok] 7342789941371571462: Downloading video feed
WARNING: [TikTok] Expecting value in '': line 1 column 1 (char 0). Retrying... (attempt 1 of 4)
[TikTok] 7342789941371571462: Downloading video feed
WARNING: [TikTok] Expecting value in '': line 1 column 1 (char 0). Retrying... (attempt 2 of 4)
[TikTok] 7342789941371571462: Downloading video feed
WARNING: [TikTok] Expecting value in '': line 1 column 1 (char 0). Retrying... (attempt 3 of 4)
[TikTok] 7342789941371571462: Downloading video feed
WARNING: [TikTok] 7342789941371571462: Failed to parse JSON (caused by JSONDecodeError("Expecting value in '': line 1 column 1 (char 0)")); trying with webpage
[TikTok] 7342789941371571462: 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] 7342789941371571462: Downloading 1 format(s): download
[debug] Invoking http downloader on "https://v16-webapp-prime.tiktok.com/video/tos/useast2a/tos-useast2a-ve-0068c004/okMCLjLWAqjFQ5CIXaAfaAiMNgbSzfFCh48fSV/?a=1988&ch=0&cr=3&dr=0&lr=tiktok_m&cd=0%7C0%7C1%7C&cv=1&br=1800&bt=900&bti=ODszNWYuMDE6&cs=0&ds=3&ft=4fUEKMFx8Zmo0H.5Y94jV..7rpWrKsd.&mime_type=video_mp4&qs=0&rc=NGQ5OTY1NTdnaDM0Ojs1ZUBpMzs4N3Q5cnlncTMzNzczM0AzLi9gMi4vNjUxX14uLV4yYSNqZWpoMmQ0NWdgLS1kMTZzcw%3D%3D&btag=e00088000&expire=1711056619&l=20240321153003FA72D5DD8E2EFA514E6F&ply_type=2&policy=2&signature=eb207c9a24f5509f1e4668cbac840d00&tk=tt_chain_token"
[debug] File locking is not supported. Proceeding without locking
[download] Destination: #CapCut #🥺💔 #new #trending #plz #plz #😭😭 #viralvideo #plunfrezzmyaccount🙏🥺 #plzvirulvideo😥 #plzviral🥺🥺🙏🙏foryoupage ⧸⧸ 𝑫𝒆𝒂𝒓 𝑻𝒊𝒌𝒕𝒐𝒌 𝑻.mp4
[download] 100% of    1.62MiB in 00:00:00 at 14.79MiB/s
```
> yt-dlp --print-traffic https://www.tiktok.com/@mix_editor_5/video/7342789941371571462

Yes, but it doesn't give you much here - neither does maybe the traffic prints...
A verbose log is just about always required when reporting a bug, as it shows things such as the version of yt-dlp, device you are running on, proxies used, dependencies installed, extra setting from a config file...
this is the complete verbose log which i captured now
i get it on all tiktok videos urls

yt-dlp --cookies '5.txt' -v 'https://www.tiktok.com/@mix_editor_5/video/7342789941371571462?is_from_webapp=1&sender_device=pc'
[debug] Command-line config: ['--cookies', '5.txt', '-v', 'https://www.tiktok.com/@mix_editor_5/video/7342789941371571462?is_from_webapp=1&sender_device=pc']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version nightly@2024.03.20.232704 from yt-dlp/yt-dlp-nightly-builds [07f5b2f75] (pip)
[debug] Python 3.11.5 (CPython AMD64 64bit) - Windows-10-10.0.22621-SP0 (OpenSSL 3.0.9 30 May 2023)
[debug] exe versions: ffmpeg 6.1-essentials_build-www.gyan.dev (setts), ffprobe 6.1-essentials_build-www.gyan.dev
[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.42.0, urllib3-2.2.1, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets
[debug] Loaded 1806 extractors
[TikTok] Extracting URL: https://www.tiktok.com/@mix_editor_5/video/7342789941371571462?is_from_webapp=1&sender_device=pc
[TikTok] 7342789941371571462: Downloading video feed
WARNING: [TikTok] Expecting value in '': line 1 column 1 (char 0). Retrying... (attempt 1 of 4)
[TikTok] 7342789941371571462: Downloading video feed
WARNING: [TikTok] Expecting value in '': line 1 column 1 (char 0). Retrying... (attempt 2 of 4)
[TikTok] 7342789941371571462: Downloading video feed
WARNING: [TikTok] Expecting value in '': line 1 column 1 (char 0). Retrying... (attempt 3 of 4)
[TikTok] 7342789941371571462: Downloading video feed
WARNING: [TikTok] 7342789941371571462: Failed to parse JSON (caused by JSONDecodeError("Expecting value in '': line 1 column 1 (char 0)")); trying with webpage
[TikTok] 7342789941371571462: 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] 7342789941371571462: Downloading 1 format(s): download
[debug] Invoking http downloader on "https://v16-webapp-prime.tiktok.com/video/tos/useast2a/tos-useast2a-ve-0068c004/okMCLjLWAqjFQ5CIXaAfaAiMNgbSzfFCh48fSV/?a=1988&ch=0&cr=3&dr=0&lr=tiktok_m&cd=0%7C0%7C1%7C&cv=1&br=1800&bt=900&bti=ODszNWYuMDE6&cs=0&ds=3&ft=4fUEKMew8Zmo0XKfY94jVcw7ypWrKsd.&mime_type=video_mp4&qs=0&rc=NGQ5OTY1NTdnaDM0Ojs1ZUBpMzs4N3Q5cnlncTMzNzczM0AzLi9gMi4vNjUxX14uLV4yYSNqZWpoMmQ0NWdgLS1kMTZzcw%3D%3D&btag=e00088000&expire=1711060577&l=20240321163602A17C399F75225D1ED5CF&ply_type=2&policy=2&signature=bcb5fb0c4e36524740778dcc49cc94d1&tk=tt_chain_token"
[download] Unable to open file: [Errno 22] Invalid argument: "#CapCut #🥺💔 #new #trending #plz #plz #😭😭 #viralvideo #plunfrezzmyaccount🙏🥺 #plzvirulvideo😥 #plzviral🥺🥺🙏🙏foryoupage ⧸⧸ 𝑫𝒆𝒂𝒓 𝑻𝒊𝒌𝒕𝒐𝒌 𝑻𝒆𝒂𝒎 𝑷𝒍𝒛 𝑫𝒐𝒏'𝒕 𝑼𝒏𝒅𝒆𝒓𝒓𝒆𝒗𝒊𝒆𝒘 𝑴𝒚 𝑽𝒊𝒅𝒆𝒐  🥺🙏😞💔 ⧸⧸#FORYOU #FORYOUPAGE#STANDWITHKASHMIR#dontunderreviewmyvideo #watsappstatus  [7342789941371571462].mp4.part". Retrying (1/3)...
[download] Unable to open file: [Errno 22] Invalid argument: "#CapCut #🥺💔 #new #trending #plz #plz #😭😭 #viralvideo #plunfrezzmyaccount🙏🥺 #plzvirulvideo😥 #plzviral🥺🥺🙏🙏foryoupage ⧸⧸ 𝑫𝒆𝒂𝒓 𝑻𝒊𝒌𝒕𝒐𝒌 𝑻𝒆𝒂𝒎 𝑷𝒍𝒛 𝑫𝒐𝒏'𝒕 𝑼𝒏𝒅𝒆𝒓𝒓𝒆𝒗𝒊𝒆𝒘 𝑴𝒚 𝑽𝒊𝒅𝒆𝒐  🥺🙏😞💔 ⧸⧸#FORYOU #FORYOUPAGE#STANDWITHKASHMIR#dontunderreviewmyvideo #watsappstatus  [7342789941371571462].mp4.part". Retrying (2/3)...
[download] Unable to open file: [Errno 22] Invalid argument: "#CapCut #🥺💔 #new #trending #plz #plz #😭😭 #viralvideo #plunfrezzmyaccount🙏🥺 #plzvirulvideo😥 #plzviral🥺🥺🙏🙏foryoupage ⧸⧸ 𝑫𝒆𝒂𝒓 𝑻𝒊𝒌𝒕𝒐𝒌 𝑻𝒆𝒂𝒎 𝑷𝒍𝒛 𝑫𝒐𝒏'𝒕 𝑼𝒏𝒅𝒆𝒓𝒓𝒆𝒗𝒊𝒆𝒘 𝑴𝒚 𝑽𝒊𝒅𝒆𝒐  🥺🙏😞💔 ⧸⧸#FORYOU #FORYOUPAGE#STANDWITHKASHMIR#dontunderreviewmyvideo #watsappstatus  [7342789941371571462].mp4.part". Retrying (3/3)...
ERROR: unable to open for writing: [Errno 22] Invalid argument: "#CapCut #🥺💔 #new #trending #plz #plz #😭😭 #viralvideo #plunfrezzmyaccount🙏🥺 #plzvirulvideo😥 #plzviral🥺🥺🙏🙏foryoupage ⧸⧸ 𝑫𝒆𝒂𝒓 𝑻𝒊𝒌𝒕𝒐𝒌 𝑻𝒆𝒂𝒎 𝑷𝒍𝒛 𝑫𝒐𝒏'𝒕 𝑼𝒏𝒅𝒆𝒓𝒓𝒆𝒗𝒊𝒆𝒘 𝑴𝒚 𝑽𝒊𝒅𝒆𝒐 🥺🙏😞💔 ⧸⧸#FORYOU #FORYOUPAGE#STANDWITHKASHMIR#dontunderreviewmyvideo #watsappstatus  [7342789941371571462].mp4.part"

Traceback (most recent call last):
  File "C:\Users\rizwa\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\utils\_utils.py", line 591, in sanitize_open
    raise LockingUnsupportedError()
yt_dlp.utils.LockingUnsupportedError: File locking is not supported

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\rizwa\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\downloader\http.py", line 265, in download
    ctx.stream, ctx.tmpfilename = self.sanitize_open(
                                  ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\rizwa\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\downloader\common.py", line 238, in wrapper
    for retry in RetryManager(self.params.get('file_access_retries', 3), error_callback, fd=self):
  File "C:\Users\rizwa\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\utils\_utils.py", line 5057, in __iter__
    self.error_callback(self.error, self.attempt, self.retries)
  File "C:\Users\rizwa\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\downloader\common.py", line 231, in error_callback
    return RetryManager.report_retry(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\rizwa\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\utils\_utils.py", line 5065, in report_retry
    raise e
  File "C:\Users\rizwa\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\downloader\common.py", line 240, in wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\rizwa\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\downloader\common.py", line 251, in sanitize_open
    f, filename = sanitize_open(filename, open_mode)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\rizwa\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\utils\_utils.py", line 594, in sanitize_open
    stream = open(filename, open_mode)
             ^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 22] Invalid argument: "#CapCut #🥺💔 #new #trending #plz #plz #😭😭 #viralvideo #plunfrezzmyaccount🙏🥺 #plzvirulvideo😥 #plzviral🥺🥺🙏🙏foryoupage ⧸⧸ 𝑫𝒆𝒂𝒓 𝑻𝒊𝒌𝒕𝒐𝒌 𝑻𝒆𝒂𝒎 𝑷𝒍𝒛 𝑫𝒐𝒏'𝒕 𝑼𝒏𝒅𝒆𝒓𝒓𝒆𝒗𝒊𝒆𝒘 𝑴𝒚 𝑽𝒊𝒅𝒆𝒐 🥺🙏😞💔 ⧸⧸#FORYOU #FORYOUPAGE#STANDWITHKASHMIR#dontunderreviewmyvideo #watsappstatus  [7342789941371571462].mp4.part"
this is the complete verbose log which i captured now
i get it on all tiktok videos urls

yt-dlp --cookies '5.txt' -v 'https://www.tiktok.com/@mix_editor_5/video/7342789941371571462?is_from_webapp=1&sender_device=pc'
[debug] Command-line config: ['--cookies', '5.txt', '-v', 'https://www.tiktok.com/@mix_editor_5/video/7342789941371571462?is_from_webapp=1&sender_device=pc']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version nightly@2024.03.20.232704 from yt-dlp/yt-dlp-nightly-builds [07f5b2f75] (pip)
[debug] Python 3.11.5 (CPython AMD64 64bit) - Windows-10-10.0.22621-SP0 (OpenSSL 3.0.9 30 May 2023)
[debug] exe versions: ffmpeg 6.1-essentials_build-www.gyan.dev (setts), ffprobe 6.1-essentials_build-www.gyan.dev
[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.42.0, urllib3-2.2.1, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets
[debug] Loaded 1806 extractors
[TikTok] Extracting URL: https://www.tiktok.com/@mix_editor_5/video/7342789941371571462?is_from_webapp=1&sender_device=pc
[TikTok] 7342789941371571462: Downloading video feed
WARNING: [TikTok] Expecting value in '': line 1 column 1 (char 0). Retrying... (attempt 1 of 4)
[TikTok] 7342789941371571462: Downloading video feed
WARNING: [TikTok] Expecting value in '': line 1 column 1 (char 0). Retrying... (attempt 2 of 4)
[TikTok] 7342789941371571462: Downloading video feed
WARNING: [TikTok] Expecting value in '': line 1 column 1 (char 0). Retrying... (attempt 3 of 4)
[TikTok] 7342789941371571462: Downloading video feed
WARNING: [TikTok] 7342789941371571462: Failed to parse JSON (caused by JSONDecodeError("Expecting value in '': line 1 column 1 (char 0)")); trying with webpage
[TikTok] 7342789941371571462: 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] 7342789941371571462: Downloading 1 format(s): download
[debug] Invoking http downloader on "https://v16-webapp-prime.tiktok.com/video/tos/useast2a/tos-useast2a-ve-0068c004/okMCLjLWAqjFQ5CIXaAfaAiMNgbSzfFCh48fSV/?a=1988&ch=0&cr=3&dr=0&lr=tiktok_m&cd=0%7C0%7C1%7C&cv=1&br=1800&bt=900&bti=ODszNWYuMDE6&cs=0&ds=3&ft=4fUEKMew8Zmo0XKfY94jVcw7ypWrKsd.&mime_type=video_mp4&qs=0&rc=NGQ5OTY1NTdnaDM0Ojs1ZUBpMzs4N3Q5cnlncTMzNzczM0AzLi9gMi4vNjUxX14uLV4yYSNqZWpoMmQ0NWdgLS1kMTZzcw%3D%3D&btag=e00088000&expire=1711060577&l=20240321163602A17C399F75225D1ED5CF&ply_type=2&policy=2&signature=bcb5fb0c4e36524740778dcc49cc94d1&tk=tt_chain_token"
[download] Unable to open file: [Errno 22] Invalid argument: "#CapCut #🥺💔 #new #trending #plz #plz #😭😭 #viralvideo #plunfrezzmyaccount🙏🥺 #plzvirulvideo😥 #plzviral🥺🥺🙏🙏foryoupage ⧸⧸ 𝑫𝒆𝒂𝒓 𝑻𝒊𝒌𝒕𝒐𝒌 𝑻𝒆𝒂𝒎 𝑷𝒍𝒛 𝑫𝒐𝒏'𝒕 𝑼𝒏𝒅𝒆𝒓𝒓𝒆𝒗𝒊𝒆𝒘 𝑴𝒚 𝑽𝒊𝒅𝒆𝒐  🥺🙏😞💔 ⧸⧸#FORYOU #FORYOUPAGE#STANDWITHKASHMIR#dontunderreviewmyvideo #watsappstatus  [7342789941371571462].mp4.part". Retrying (1/3)...
[download] Unable to open file: [Errno 22] Invalid argument: "#CapCut #🥺💔 #new #trending #plz #plz #😭😭 #viralvideo #plunfrezzmyaccount🙏🥺 #plzvirulvideo😥 #plzviral🥺🥺🙏🙏foryoupage ⧸⧸ 𝑫𝒆𝒂𝒓 𝑻𝒊𝒌𝒕𝒐𝒌 𝑻𝒆𝒂𝒎 𝑷𝒍𝒛 𝑫𝒐𝒏'𝒕 𝑼𝒏𝒅𝒆𝒓𝒓𝒆𝒗𝒊𝒆𝒘 𝑴𝒚 𝑽𝒊𝒅𝒆𝒐  🥺🙏😞💔 ⧸⧸#FORYOU #FORYOUPAGE#STANDWITHKASHMIR#dontunderreviewmyvideo #watsappstatus  [7342789941371571462].mp4.part". Retrying (2/3)...
[download] Unable to open file: [Errno 22] Invalid argument: "#CapCut #🥺💔 #new #trending #plz #plz #😭😭 #viralvideo #plunfrezzmyaccount🙏🥺 #plzvirulvideo😥 #plzviral🥺🥺🙏🙏foryoupage ⧸⧸ 𝑫𝒆𝒂𝒓 𝑻𝒊𝒌𝒕𝒐𝒌 𝑻𝒆𝒂𝒎 𝑷𝒍𝒛 𝑫𝒐𝒏'𝒕 𝑼𝒏𝒅𝒆𝒓𝒓𝒆𝒗𝒊𝒆𝒘 𝑴𝒚 𝑽𝒊𝒅𝒆𝒐  🥺🙏😞💔 ⧸⧸#FORYOU #FORYOUPAGE#STANDWITHKASHMIR#dontunderreviewmyvideo #watsappstatus  [7342789941371571462].mp4.part". Retrying (3/3)...
ERROR: unable to open for writing: [Errno 22] Invalid argument: "#CapCut #🥺💔 #new #trending #plz #plz #😭😭 #viralvideo #plunfrezzmyaccount🙏🥺 #plzvirulvideo😥 #plzviral🥺🥺🙏🙏foryoupage ⧸⧸ 𝑫𝒆𝒂𝒓 𝑻𝒊𝒌𝒕𝒐𝒌 𝑻𝒆𝒂𝒎 𝑷𝒍𝒛 𝑫𝒐𝒏'𝒕 𝑼𝒏𝒅𝒆𝒓𝒓𝒆𝒗𝒊𝒆𝒘 𝑴𝒚 𝑽𝒊𝒅𝒆𝒐 🥺🙏😞💔 ⧸⧸#FORYOU #FORYOUPAGE#STANDWITHKASHMIR#dontunderreviewmyvideo #watsappstatus  [7342789941371571462].mp4.part"

Traceback (most recent call last):
  File "C:\Users\rizwa\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\utils\_utils.py", line 591, in sanitize_open
    raise LockingUnsupportedError()
yt_dlp.utils.LockingUnsupportedError: File locking is not supported

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\rizwa\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\downloader\http.py", line 265, in download
    ctx.stream, ctx.tmpfilename = self.sanitize_open(
                                  ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\rizwa\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\downloader\common.py", line 238, in wrapper
    for retry in RetryManager(self.params.get('file_access_retries', 3), error_callback, fd=self):
  File "C:\Users\rizwa\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\utils\_utils.py", line 5057, in __iter__
    self.error_callback(self.error, self.attempt, self.retries)
  File "C:\Users\rizwa\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\downloader\common.py", line 231, in error_callback
    return RetryManager.report_retry(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\rizwa\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\utils\_utils.py", line 5065, in report_retry
    raise e
  File "C:\Users\rizwa\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\downloader\common.py", line 240, in wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\rizwa\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\downloader\common.py", line 251, in sanitize_open
    f, filename = sanitize_open(filename, open_mode)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\rizwa\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\utils\_utils.py", line 594, in sanitize_open
    stream = open(filename, open_mode)
             ^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 22] Invalid argument: "#CapCut #🥺💔 #new #trending #plz #plz #😭😭 #viralvideo #plunfrezzmyaccount🙏🥺 #plzvirulvideo😥 #plzviral🥺🥺🙏🙏foryoupage ⧸⧸ 𝑫𝒆𝒂𝒓 𝑻𝒊𝒌𝒕𝒐𝒌 𝑻𝒆𝒂𝒎 𝑷𝒍𝒛 𝑫𝒐𝒏'𝒕 𝑼𝒏𝒅𝒆𝒓𝒓𝒆𝒗𝒊𝒆𝒘 𝑴𝒚 𝑽𝒊𝒅𝒆𝒐 🥺🙏😞💔 ⧸⧸#FORYOU #FORYOUPAGE#STANDWITHKASHMIR#dontunderreviewmyvideo #watsappstatus  [7342789941371571462].mp4.part"
yt-dlp should still be able to download the webpage version of the video in most cases. Try adding `-f 0` to your command to select the format without a watermark. The quality will not be quite as good as the mobile API feed formats, though.

> ERROR: unable to open for writing: [Errno 2] No such file or directory
> ERROR: unable to open for writing: [Errno 22] Invalid argument:

If you get an error like this, it just means the output filename is too long. Add `-o "%(title).100B [%(id)s].%(ext)s"` to your command
Also, should note that for 1 out of every ~30 attempts, I don't receive this error and I am still able to get the mobile API feed formats.
i want data in json and it returns but when i open the video url in my browser i get access deneid
Access Denied i try to open this url in different browsers but result is same
You don't have permission to access "http://v16-webapp-prime.tiktok.com/video/tos/useast2a/tos-useast2a-ve-0068c003/o0lJmAxvtJdSiEIlb5FfBBQ0R1U7RYQQRfD1E8/?" on this server.
Reference #18.9584dead.1711040325.fc05b85
actually i think when ever i make request tiktok send a captcha with 403 response and ytdlp give me back this page 🤔 if i'm right than how can i solve this issue i also try proxy but nothing changed
> i want data in json and it returns but when i open the video url in my browser i get access deneid Access Denied i try to open this url in different browsers but result is same You don't have permission to access "http://v16-webapp-prime.tiktok.com/video/tos/useast2a/tos-useast2a-ve-0068c003/o0lJmAxvtJdSiEIlb5FfBBQ0R1U7RYQQRfD1E8/?" on this server. Reference #18.9584dead.1711040325.fc05b85

~~That's because some specific cookies have to be passed with the request, which your browser obviously doesn't do. So it's not an actual problem in this case~~ Just checked the code, it isn't. Sorry for misinformation
Hello guys, Now can download video from tiktok without watermark with yt-dlp master

I tried but the one with format 0 still returns watermark.

```[debug] Command-line config: ['https://www.tiktok.com/@highwaycafe_th/video/7345036214791163138', '--verbose']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2024.03.10 from yt-dlp/yt-dlp [615a84447]
[debug] Python 3.10.0 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1l  24 Aug 2021)
[debug] exe versions: ffmpeg 2023-07-19-git-efa6cec759-full_build-www.gyan.dev (setts), ffprobe 2023-07-19-git-efa6cec759-full_build-www.gyan.dev
[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
[TikTok] Extracting URL: https://www.tiktok.com/@highwaycafe_th/video/7345036214791163138
[TikTok] 7345036214791163138: Downloading video feed
WARNING: [TikTok] Expecting value in '': line 1 column 1 (char 0). Retrying... (attempt 1 of 4)
[TikTok] 7345036214791163138: Downloading video feed
WARNING: [TikTok] Expecting value in '': line 1 column 1 (char 0). Retrying... (attempt 2 of 4)
[TikTok] 7345036214791163138: Downloading video feed
WARNING: [TikTok] Expecting value in '': line 1 column 1 (char 0). Retrying... (attempt 3 of 4)
[TikTok] 7345036214791163138: Downloading video feed
WARNING: [TikTok] 7345036214791163138: Failed to parse JSON (caused by JSONDecodeError("Expecting value in '': line 1 column 1 (char 0)")); trying with webpage
[TikTok] 7345036214791163138: 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] 7345036214791163138: Downloading 1 format(s): download
[debug] Invoking http downloader on "https://v16-webapp-prime.tiktok.com/video/tos/alisg/tos-alisg-pve-0037c001/o8BQRKDo7Psf8GfFdUGrUtZEg0qFQEliBIgA67/?a=1988&ch=0&cr=3&dr=0&lr=tiktok&cd=0%7C0%7C1%7C&cv=1&br=2660&bt=1330&bti=ODszNWYuMDE6&cs=0&ds=3&ft=4fUEKMZj8Zmo0JGLY94jV~C3ypWrKsd.&mime_type=video_mp4&qs=0&rc=ODRlZDUzOWQ1Zmc4OTtlaUBpM3dlOG85cjlmcTMzODczNEAtMDY0MDBgNTExYmBjLWI0YSNxL2AyMmRjcmtgLS1kMTFzcw%3D%3D&btag=e00088000&expire=1711117107&l=202403220818089D1EA9E997746E309378&ply_type=2&policy=2&signature=1c0c0a2221935452ab930d1e17eaf8d8&tk=tt_chain_token"
[debug] File locking is not supported. Proceeding without locking
[download] Destination: I love Highway Cafe #ลูกรักไฮเวย์  [7345036214791163138].mp4
[download] 100% of    3.08MiB in 00:00:01 at 2.47MiB/s```
format 0 but quality is not good

sorry for asking questions here but I need to know if there's ANY other way of downloading in full quality (watermarked or not) from the webpage. i'm not web literate, so I'm not sure if it's possible to manually access a video through your browser or something, but since i've never seen a mention of it i'm guessing it's not? just wanna be sure
> sorry for asking questions here but I need to know if there's ANY other way of downloading in full quality (watermarked or not) from the webpage. i'm not web literate, so I'm not sure if it's possible to manually access a video through your browser or something, but since i've never seen a mention of it i'm guessing it's not? just wanna be sure很抱歉在这里提问，但我需要知道是否有任何其他方法可以从网页下载全质量（水印或无水印）。我不懂网络，所以我不确定是否可以通过浏览器或其他东西手动访问视频，但由于我从未见过提及它，我猜它不是？只是想确定一下

try it, work well.

[https://www.tiktokarchive.com/](https://www.tiktokarchive.com/)
So are we thinking this is a major api rework from tiktok? All of the aweme api urls seem to be failing often now.

hello guys , who can help me to fix went me donwload video from tiktok with yt-dlp master , still watermark

This issue still happen on nightly and master right?
> This issue still happen on nightly and master right?

Yes it does
Anyone have any ideas on how to fix this?
 ‘Awame ’ this method is ineffective
I'm not very related to tiktok extractor. But I think that with this piece of code can solve the problem. The json response is identical to what the old api used to respond:

```
import requests

video_id = 'ur video id'
headers = {'User-Agent': 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Mobile Safari/537.36' }

tiktok_video_data_endpoint = 'https://api22-normal-c-alisg.tiktokv.com/aweme/v1/feed/'
params = {
            "iid": "7318518857994389254",
            "device_id": "7318517321748022790",
            "channel": "googleplay",
            "app_name": "musical_ly",
            "version_code": "300904",
            "device_platform": "android",
            "device_type": "ASUS_Z01QD",
            "os_version": "9",
            "aweme_id": video_id  # now video id is used here
        }

try:
    json_video_data = requests.get(tiktok_video_data_endpoint, params=params, headers=headers).json()
except Exception as e:
    raise SystemExit('connection error with api')

print(json_video_data)

```
```py
            "aweme_id": video_id  # now video id is used here
```
^ nah this is how we were always doing it

```py
            "iid": "7318518857994389254",
            "device_id": "7318517321748022790",
```
^ this is what is new, and what I've seen a couple other projects on github start doing today.

TikTok seems to be enforcing/checking the `iid` and `device_id` params now for the feed endpoint. The problem here, is that `iid` is the installation id of the mobile app and `device_id` is the accompanying id for the mobile device on which it is installed. These params [cannot be faked with random values](https://github.com/szdc/tiktok-api/issues/138). So since this `iid` and `device_id` belong to a real TikTok installation on someone's device, it's likely only a matter of time before it is banned for spam/scraping
> ```python
>             "aweme_id": video_id  # now video id is used here
> ```
> 
> ^ nah this is how we were always doing it
> 
> ```python
>             "iid": "7318518857994389254",
>             "device_id": "7318517321748022790",
> ```
> 
> ^ this is what is new, and what I've seen a couple other projects on github start doing today.
> 
> TikTok seems to be enforcing/checking the `iid` and `device_id` params now for the feed endpoint. The problem here, is that `iid` is the installation id of the mobile app and `device_id` is the accompanying id for the mobile device on which it is installed. These params [cannot be faked with random values](https://github.com/szdc/tiktok-api/issues/138). So since this `iid` and `device_id` belong to a real TikTok installation on someone's device, it's likely only a matter of time before it is banned for spam/scraping

mmm and looks like get the `iid` param from the device is not easy, understand. But you can fake `device_id` with a valid  `iid` and still works (which seems strange to me, many devices linked to the same installation id), probably not enough yet
I tried this and it works for now:

```
    def _build_api_query(self, query, app_version, manifest_app_version):
        return {
            **query,
            'version_name': app_version,
            'version_code': manifest_app_version,
            'build_number': app_version,
            'manifest_version_code': manifest_app_version,
            'update_version_code': manifest_app_version,
            'openudid': ''.join(random.choices('0123456789abcdef', k=16)),
            'uuid': ''.join(random.choices(string.digits, k=16)),
            '_rticket': int(time.time() * 1000),
            'ts': int(time.time()),
            #'device_brand': 'Google',
            #'device_type': 'Pixel 7',
            'device_platform': 'android',
            'resolution': '1080*2400',
            'dpi': 420,
            'os_version': '13',
            'os_api': '29',
            'carrier_region': 'US',
            'sys_region': 'US',
            'region': 'US',
            #'app_name': self._APP_NAME,
            'app_language': 'en',
            'language': 'en',
            'timezone_name': 'America/New_York',
            'timezone_offset': '-14400',
            'channel': 'googleplay',
            'ac': 'wifi',
            'mcc_mnc': '310260',
            'is_my_cn': 0,
            #'aid': self._AID,
            'ssmix': 'a',
            'as': 'a1qwert123',
            'cp': 'cbfhckdckkde1',

            "iid": "7318518857994389254",
            "device_id": "7318517321748022790",
            "device_type": "ASUS_Z01QD",
        }
```

Otherwise, I change the `_APP_NAME` field to `"musical_ly"` and it works.
> > 
> 
> try it, work well.
> 
> https://www.tiktokarchive.com/

it does not work, bro.
> > > 
> > 
> > 
> > try it, work well.
> > https://www.tiktokarchive.com/
> 
> it does not work, bro.

This one does https://musicaldown.com
https://github.com/Evil0ctal/Douyin_TikTok_Download_API/commit/1db94fc8ad144abacb344e6f3a7ab471e0ecee46
> [Evil0ctal/Douyin_TikTok_Download_API@1db94fc](https://github.com/Evil0ctal/Douyin_TikTok_Download_API/commit/1db94fc8ad144abacb344e6f3a7ab471e0ecee46)

This still uses the same `iid`, `device_id` and `device_type` data that's floating around already.
> > [Evil0ctal/Douyin_TikTok_Download_API@1db94fc](https://github.com/Evil0ctal/Douyin_TikTok_Download_API/commit/1db94fc8ad144abacb344e6f3a7ab471e0ecee46)
> 
> This still uses the same `iid`, `device_id` and `device_type` data that's floating around already.

Does that mean there's still a risk of access to the TikTok API endpoint being down again in the future?
> Does that mean there's still a risk of access to the TikTok API endpoint being down again in the future?

The endpoint hasn't been down. It has become more restricted. One solution to these increased restrictions is to pass an `iid` & `device_id` pair.

Each installation of the TT mobile app is assigned a unique `iid` value, presumably for security and tracking purposes. If we were to add this 1 `iid` value to yt-dlp's TT extractor, then due to the volume of yt-dlp users, there is a high probability that this `iid` would be blocked by TT shortly after the next stable release (if not sooner). IMO this is not a viable solution. It would be fairly easy to create a plugin that utilizes this solution, though
while I am against hardcoding someone else's `iid` into the extractor, perhaps a "bring your own `iid`" approach would be acceptable until a better/proper solution is found.

here's a patch with a minimal diff that would allow you to pass `--extractor-args "tiktok:iid=VALUE"`, replacing `VALUE` with an actual working `iid` value
```diff
diff --git a/yt_dlp/extractor/tiktok.py b/yt_dlp/extractor/tiktok.py
index 02545bc79..e7d0c2063 100644
--- a/yt_dlp/extractor/tiktok.py
+++ b/yt_dlp/extractor/tiktok.py
@@ -32,8 +32,8 @@
 class TikTokBaseIE(InfoExtractor):
     _APP_VERSIONS = [('26.1.3', '260103'), ('26.1.2', '260102'), ('26.1.1', '260101'), ('25.6.2', '250602')]
     _WORKING_APP_VERSION = None
-    _APP_NAME = 'trill'
-    _AID = 1180
+    _APP_NAME = 'musical_ly'
+    _AID = 0
     _UPLOADER_URL_FORMAT = 'https://www.tiktok.com/@%s'
     _WEBPAGE_HOST = 'https://www.tiktok.com/'
     QUALITIES = ('360p', '540p', '720p', '1080p')
@@ -41,7 +41,7 @@ class TikTokBaseIE(InfoExtractor):
     @property
     def _API_HOSTNAME(self):
         return self._configuration_arg(
-            'api_hostname', ['api22-normal-c-useast2a.tiktokv.com'], ie_key=TikTokIE)[0]
+            'api_hostname', ['api22-normal-c-alisg.tiktokv.com'], ie_key=TikTokIE)[0]
 
     @staticmethod
     def _create_url(user_id, video_id):
@@ -106,6 +106,8 @@ def _build_api_query(self, query, app_version, manifest_app_version):
             'ssmix': 'a',
             'as': 'a1qwert123',
             'cp': 'cbfhckdckkde1',
+            'iid': self._configuration_arg('iid', ['0'], ie_key=TikTokIE)[0],
+            'device_id': ''.join(random.choices(string.digits, k=16)),
         }
 
     def _call_api(self, ep, query, video_id, fatal=True,
```
@bashonly Seems like a decent workaround. Is there an easy way to get our own iid from the iOS tiktok app? 
> @bashonly Seems like a decent workaround. Is there an easy way to get our own iid from the iOS tiktok app?

https://medium.com/@szdc/reverse-engineering-the-musical-ly-api-662331008eb3 describes the steps needed to do this, but uses Android. Bottom line - you need to capture the unencrypted traffic between your phone and the server. It's of course possible that this value is also stored in the app's persistent storage somewhere but I don't think anybody's explored that so far.

Resolving patch:
diff --git a/yt_dlp/extractor/tiktok.py b/yt_dlp/extractor/tiktok.py
--- a/yt_dlp/extractor/tiktok.py
+++ b/yt_dlp/extractor/tiktok.py
@@ -4,6 +4,7 @@
 import re
 import string
 import time
+import uuid
 
 from .common import InfoExtractor
 from ..compat import compat_urllib_parse_urlparse
@@ -30,19 +31,65 @@
 
 
 class TikTokBaseIE(InfoExtractor):
-    _APP_VERSIONS = [('26.1.3', '260103'), ('26.1.2', '260102'), ('26.1.1', '260101'), ('25.6.2', '250602')]
-    _WORKING_APP_VERSION = None
-    _APP_NAME = 'trill'
-    _AID = 1180
     _UPLOADER_URL_FORMAT = 'https://www.tiktok.com/@%s'
     _WEBPAGE_HOST = 'https://www.tiktok.com/'
     QUALITIES = ('360p', '540p', '720p', '1080p')
 
+    _APP_INFO_DEFAULTS = {
+        # unique "install id"
+        'iid': None,
+        # TikTok (KR/PH/TW/TH/VN) = trill, TikTok (rest of world) = musical_ly, Douyin = aweme
+        'app_name': 'musical_ly',
+        'app_version': '34.1.2',
+        'manifest_app_version': '2023401020',
+        # "app id": aweme = 1128, trill = 1180, musical_ly = 1233, universal = 0
+        'aid': '0',
+    }
+    _KNOWN_APP_INFO = [
+        '7351144126450059040',
+        '7351149742343391009',
+        '7351153174894626592',
+    ]
+    _APP_INFO_POOL = None
+    _APP_INFO = None
+    _APP_USER_AGENT = None
+
     @property
     def _API_HOSTNAME(self):
         return self._configuration_arg(
             'api_hostname', ['api22-normal-c-useast2a.tiktokv.com'], ie_key=TikTokIE)[0]
 
+    def _get_next_app_info(self):
+        if self._APP_INFO_POOL is None:
+            defaults = {
+                key: self._configuration_arg(key, [default], ie_key=TikTokIE)[0]
+                for key, default in self._APP_INFO_DEFAULTS.items()
+                if key != 'iid'
+            }
+            app_info_list = (
+                self._configuration_arg('app_info', ie_key=TikTokIE)
+                or random.sample(self._KNOWN_APP_INFO, len(self._KNOWN_APP_INFO)))
+            self._APP_INFO_POOL = [
+                {**defaults, **dict(
+                    (k, v) for k, v in zip(self._APP_INFO_DEFAULTS, app_info.split('/')) if v
+                )} for app_info in app_info_list
+            ]
+
+        if not self._APP_INFO_POOL:
+            return False
+
+        self._APP_INFO = self._APP_INFO_POOL.pop(0)
+
+        app_name = self._APP_INFO['app_name']
+        version = self._APP_INFO['manifest_app_version']
+        if app_name == 'musical_ly':
+            package = f'com.zhiliaoapp.musically/{version}'
+        else:  # trill, aweme
+            package = f'com.ss.android.ugc.{app_name}/{version}'
+        self._APP_USER_AGENT = f'{package} (Linux; U; Android 13; en_US; Pixel 7; Build/TD1A.220804.031; Cronet/58.0.2991.0)'
+
+        return True
+
     @staticmethod
     def _create_url(user_id, video_id):
         return f'https://www.tiktok.com/@{user_id or "_"}/video/{video_id}'
@@ -58,7 +105,7 @@ def _get_universal_data(self, webpage, display_id):
             'universal data', display_id, end_pattern=r'</script>', default={}),
             ('__DEFAULT_SCOPE__', {dict})) or {}
 
-    def _call_api_impl(self, ep, query, manifest_app_version, video_id, fatal=True,
+    def _call_api_impl(self, ep, query, video_id, fatal=True,
                        note='Downloading API JSON', errnote='Unable to download API page'):
         self._set_cookie(self._API_HOSTNAME, 'odin_tt', ''.join(random.choices('0123456789abcdef', k=160)))
         webpage_cookies = self._get_cookies(self._WEBPAGE_HOST)
@@ -67,80 +114,84 @@ def _call_api_impl(self, ep, query, manifest_app_version, video_id, fatal=True,
         return self._download_json(
             'https://%s/aweme/v1/%s/' % (self._API_HOSTNAME, ep), video_id=video_id,
             fatal=fatal, note=note, errnote=errnote, headers={
-                'User-Agent': f'com.ss.android.ugc.{self._APP_NAME}/{manifest_app_version} (Linux; U; Android 13; en_US; Pixel 7; Build/TD1A.220804.031; Cronet/58.0.2991.0)',
+                'User-Agent': self._APP_USER_AGENT,
                 'Accept': 'application/json',
             }, query=query)
 
-    def _build_api_query(self, query, app_version, manifest_app_version):
+    def _build_api_query(self, query):
         return {
             **query,
-            'version_name': app_version,
-            'version_code': manifest_app_version,
-            'build_number': app_version,
-            'manifest_version_code': manifest_app_version,
-            'update_version_code': manifest_app_version,
-            'openudid': ''.join(random.choices('0123456789abcdef', k=16)),
-            'uuid': ''.join(random.choices(string.digits, k=16)),
-            '_rticket': int(time.time() * 1000),
-            'ts': int(time.time()),
-            'device_brand': 'Google',
-            'device_type': 'Pixel 7',
             'device_platform': 'android',
+            'os': 'android',
+            'ssmix': 'a',
+            '_rticket': int(time.time() * 1000),
+            'cdid': str(uuid.uuid4()),
+            'channel': 'googleplay',
+            'aid': self._APP_INFO['aid'],
+            'app_name': self._APP_INFO['app_name'],
+            'version_code': ''.join((f'{int(v):02d}' for v in self._APP_INFO['app_version'].split('.'))),
+            'version_name': self._APP_INFO['app_version'],
+            'manifest_version_code': self._APP_INFO['manifest_app_version'],
+            'update_version_code': self._APP_INFO['manifest_app_version'],
+            'ab_version': self._APP_INFO['app_version'],
             'resolution': '1080*2400',
             'dpi': 420,
-            'os_version': '13',
+            'device_type': 'Pixel 7',
+            'device_brand': 'Google',
+            'language': 'en',
             'os_api': '29',
-            'carrier_region': 'US',
+            'os_version': '13',
+            'ac': 'wifi',
+            'is_pad': '0',
+            'current_region': 'US',
+            'app_type': 'normal',
             'sys_region': 'US',
-            'region': 'US',
-            'app_name': self._APP_NAME,
-            'app_language': 'en',
-            'language': 'en',
+            'last_install_time': int(time.time()) - random.randint(86400, 1123200),
             'timezone_name': 'America/New_York',
+            'residence': 'US',
+            'app_language': 'en',
             'timezone_offset': '-14400',
-            'channel': 'googleplay',
-            'ac': 'wifi',
-            'mcc_mnc': '310260',
-            'is_my_cn': 0,
-            'aid': self._AID,
-            'ssmix': 'a',
-            'as': 'a1qwert123',
-            'cp': 'cbfhckdckkde1',
+            'host_abi': 'armeabi-v7a',
+            'locale': 'en',
+            'ac2': 'wifi5g',
+            'uoo': '1',
+            'op_region': 'US',
+            'build_number': self._APP_INFO['app_version'],
+            'region': 'US',
+            'ts': int(time.time()),
+            'iid': self._APP_INFO['iid'],
+            'device_id': random.randint(7250000000000000000, 7351147085025500000),
+            'openudid': ''.join(random.choices('0123456789abcdef', k=16)),
         }
 
     def _call_api(self, ep, query, video_id, fatal=True,
                   note='Downloading API JSON', errnote='Unable to download API page'):
-        if not self._WORKING_APP_VERSION:
-            app_version = self._configuration_arg('app_version', [''], ie_key=TikTokIE.ie_key())[0]
-            manifest_app_version = self._configuration_arg('manifest_app_version', [''], ie_key=TikTokIE.ie_key())[0]
-            if app_version and manifest_app_version:
-                self._WORKING_APP_VERSION = (app_version, manifest_app_version)
-                self.write_debug('Imported app version combo from extractor arguments')
-            elif app_version or manifest_app_version:
-                self.report_warning('Only one of the two required version params are passed as extractor arguments', only_once=True)
-
-        if self._WORKING_APP_VERSION:
-            app_version, manifest_app_version = self._WORKING_APP_VERSION
-            real_query = self._build_api_query(query, app_version, manifest_app_version)
-            return self._call_api_impl(ep, real_query, manifest_app_version, video_id, fatal, note, errnote)
-
-        for count, (app_version, manifest_app_version) in enumerate(self._APP_VERSIONS, start=1):
-            real_query = self._build_api_query(query, app_version, manifest_app_version)
+        if not self._APP_INFO and not self._get_next_app_info():
+            message = 'No working app info is available'
+            if fatal:
+                raise ExtractorError(message, expected=True)
+            else:
+                self.report_warning(message)
+                return
+
+        max_tries = len(self._APP_INFO_POOL) + 1  # _APP_INFO_POOL + _APP_INFO
+        for count in itertools.count(1):
+            self.write_debug(str(self._APP_INFO))
+            real_query = self._build_api_query(query)
             try:
-                res = self._call_api_impl(ep, real_query, manifest_app_version, video_id, fatal, note, errnote)
-                self._WORKING_APP_VERSION = (app_version, manifest_app_version)
-                return res
+                return self._call_api_impl(ep, real_query, video_id, fatal, note, errnote)
             except ExtractorError as e:
                 if isinstance(e.cause, json.JSONDecodeError) and e.cause.pos == 0:
-                    if count == len(self._APP_VERSIONS):
+                    message = str(e.cause or e.msg)
+                    if not self._get_next_app_info():
                         if fatal:
-                            raise e
+                            raise
                         else:
-                            self.report_warning(str(e.cause or e.msg))
+                            self.report_warning(message)
                             return
-                    self.report_warning('%s. Retrying... (attempt %s of %s)' % (str(e.cause or e.msg), count, len(self._APP_VERSIONS)))
+                    self.report_warning(f'{message}. Retrying... (attempt {count} of {max_tries})')
                     continue
-                raise e
+                raise
 
     def _extract_aweme_app(self, aweme_id):
         feed_list = self._call_api(


Test patch: