yt-dlp icon indicating copy to clipboard operation
yt-dlp copied to clipboard

[TikTok] Failed to parse JSON/ No video formats found

Open seaklin83546 opened this issue 11 months ago โ€ข 97 comments

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

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"

original log for reference
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'

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

[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 [email protected] 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: [email protected] from yt-dlp/yt-dlp-master-builds
yt-dlp is up to date ([email protected] 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

seaklin83546 avatar Mar 21 '24 09:03 seaklin83546

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"

Rizwan-Basheer avatar Mar 21 '24 10:03 Rizwan-Basheer

nobody can share a verbose log?

bashonly avatar Mar 21 '24 15:03 bashonly

yt-dlp --cookies '5.txt' 'https://www.tiktok.com/@mix_editor_5/video/7342789941371571462

Here's with traffic - or would you need some further debug prints around the problematic areas where the parser fails?

--print-traffic log
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"

andersgb1 avatar Mar 21 '24 15:03 andersgb1

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 [email protected] 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: [email protected] from yt-dlp/yt-dlp-master-builds
yt-dlp is up to date ([email protected] 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

seproDev avatar Mar 21 '24 15:03 seproDev

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...

andersgb1 avatar Mar 21 '24 15:03 andersgb1

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...

seproDev avatar Mar 21 '24 16:03 seproDev

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 [email protected] 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"

Rizwan-Basheer avatar Mar 21 '24 16:03 Rizwan-Basheer

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 [email protected] 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"

Rizwan-Basheer avatar Mar 21 '24 16:03 Rizwan-Basheer

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

bashonly avatar Mar 21 '24 16:03 bashonly

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.

bashonly avatar Mar 21 '24 16:03 bashonly

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

Rizwan-Basheer avatar Mar 21 '24 16:03 Rizwan-Basheer

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

Rizwan-Basheer avatar Mar 21 '24 17:03 Rizwan-Basheer

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

mrzenc avatar Mar 21 '24 19:03 mrzenc

Hello guys, Now can download video from tiktok without watermark with yt-dlp master

nodata168 avatar Mar 22 '24 07:03 nodata168

I tried but the one with format 0 still returns watermark.

[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version [email protected] 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```

xuen97 avatar Mar 22 '24 08:03 xuen97

format 0 but quality is not good

nodata168 avatar Mar 22 '24 08:03 nodata168

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

bruno0157 avatar Mar 22 '24 22:03 bruno0157

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/

austin2035 avatar Mar 23 '24 02:03 austin2035

So are we thinking this is a major api rework from tiktok? All of the aweme api urls seem to be failing often now.

timmbobb avatar Mar 23 '24 04:03 timmbobb

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

nodata168 avatar Mar 23 '24 06:03 nodata168

This issue still happen on nightly and master right?

zulfiqarlaili avatar Mar 24 '24 16:03 zulfiqarlaili

This issue still happen on nightly and master right?

Yes it does

andersgb1 avatar Mar 24 '24 16:03 andersgb1

Anyone have any ideas on how to fix this?

timmbobb avatar Mar 25 '24 02:03 timmbobb

โ€˜Awame โ€™ this method is ineffective

admin313cn avatar Mar 25 '24 03:03 admin313cn

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)

descargarbot avatar Mar 26 '24 03:03 descargarbot

            "aweme_id": video_id  # now video id is used here

^ nah this is how we were always doing it

            "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. 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

bashonly avatar Mar 26 '24 04:03 bashonly

            "aweme_id": video_id  # now video id is used here

^ nah this is how we were always doing it

            "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. 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

descargarbot avatar Mar 26 '24 04:03 descargarbot

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.

xuen97 avatar Mar 26 '24 10:03 xuen97

try it, work well.

https://www.tiktokarchive.com/

it does not work, bro.

gnouv avatar Mar 26 '24 13:03 gnouv

try it, work well. https://www.tiktokarchive.com/

it does not work, bro.

This one does https://musicaldown.com

5708skier avatar Mar 27 '24 02:03 5708skier