-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Labels
Description
A few days ago I could still download TikTok videos with gallery-dl. Today I can't download any. Here's what I get after running gallery-dl --verbose "https://www.tiktok.com/@hakimdailyyy/video/7588853215685381384". I did provide the cookies file in my ~/.config/gallery-dl/config.json. What went wrong? Thank you.
[gallery-dl][debug] Version 1.31.1
[gallery-dl][debug] Python 3.13.11 - Linux-6.18.2-2-cachyos-x86_64-with-glibc2.42
[gallery-dl][debug] requests 2.32.5 - urllib3 2.6.2
[gallery-dl][debug] Configuration Files ['${HOME}/.config/gallery-dl/config.json']
[gallery-dl][debug] Starting DownloadJob for 'https://www.tiktok.com/@hakimdailyyy/video/7588853215685381384'
[tiktok][debug] Using TiktokPostExtractor for 'https://www.tiktok.com/@hakimdailyyy/video/7588853215685381384'
[tiktok][debug] cookies: Loading cookies from '$HOME/.config/gallery-dl/www.tiktok.com_cookies.txt'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): www.tiktok.com:443
[urllib3.connectionpool][debug] https://www.tiktok.com:443 "GET /@hakimdailyyy/video/7588853215685381384 HTTP/1.1" 200 640
[tiktok][warning] 7588853215685381384: Failed to retrieve rehydration data (1/4)
[tiktok][debug] Sleeping 30.00 seconds (retry)
[urllib3.connectionpool][debug] https://www.tiktok.com:443 "GET /@hakimdailyyy/video/7588853215685381384 HTTP/1.1" 200 643
[tiktok][warning] 7588853215685381384: Failed to retrieve rehydration data (2/4)
[tiktok][debug] Sleeping 30.00 seconds (retry)
[urllib3.connectionpool][debug] https://www.tiktok.com:443 "GET /@hakimdailyyy/video/7588853215685381384 HTTP/1.1" 200 642
[tiktok][warning] 7588853215685381384: Failed to retrieve rehydration data (3/4)
[tiktok][debug] Sleeping 30.00 seconds (retry)
[urllib3.connectionpool][debug] https://www.tiktok.com:443 "GET /@hakimdailyyy/video/7588853215685381384 HTTP/1.1" 200 642
[tiktok][warning] 7588853215685381384: Failed to retrieve rehydration data (4/4)
[tiktok][debug] Sleeping 30.00 seconds (retry)
[urllib3.connectionpool][debug] https://www.tiktok.com:443 "GET /@hakimdailyyy/video/7588853215685381384 HTTP/1.1" 200 643
[tiktok][error] An unexpected error occurred: JSONDecodeError - Expecting value: line 1 column 1 (char 0). Please run gallery-dl again with the --verbose flag, copy its output and report this issue on https://github.com/mikf/gallery-dl/issues .
[tiktok][debug]
Traceback (most recent call last):
File "/home/sondhg/.local/share/uv/tools/gallery-dl/lib/python3.13/site-packages/gallery_dl/job.py", line 158, in run
msg = self.dispatch(extractor)
File "/home/sondhg/.local/share/uv/tools/gallery-dl/lib/python3.13/site-packages/gallery_dl/job.py", line 209, in dispatch
for msg, url, kwdict in messages:
^^^^^^^^
File "/home/sondhg/.local/share/uv/tools/gallery-dl/lib/python3.13/site-packages/gallery_dl/extractor/tiktok.py", line 33, in items
data = self._extract_rehydration_data(tiktok_url)
File "/home/sondhg/.local/share/uv/tools/gallery-dl/lib/python3.13/site-packages/gallery_dl/extractor/tiktok.py", line 118, in _extract_rehydration_data
return util.json_loads(data)["__DEFAULT_SCOPE__"]
~~~~~~~~~~~~~~~^^^^^^
File "/usr/lib/python3.13/json/decoder.py", line 345, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/json/decoder.py", line 363, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)Edit: I installed gallery-dl via uv tool install gallery-dl --with 'yt-dlp[default,curl-cffi]'. It has been working fine for months.
Just now I tried
uv tool install yt-dlp --with curl-cffi
yt-dlp --cookies-from-browser vivaldi "https://www.tiktok.com/@hakimdailyyy/video/7588853215685381384"and it works. Is this problem related to browser impersonation? Why doesn't it work for gallery-dl?
Reactions are currently unavailable