question-mark
Stuck on an issue?

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

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

[Tiktok] Unable to download some Tiktok videos

See original GitHub issue

Checklist

Region

US

Description

Unable to download some Tiktok videos

Verbose log

root@local:~/test# /usr/local/bin/yt-dlp.sh -Uv  https://www.tiktok.com/@chloecatalanooo/video/7041197121529203974?_t=8OnUindHzoj 
[debug] Command-line config: ['-Uv', 'https://www.tiktok.com/@chloecatalanooo/video/7041197121529203974?_t=8OnUindHzoj']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, err utf-8, pref UTF-8
[debug] yt-dlp version 2021.12.27 [6223f67a8] (source)
[debug] Plugins: ['SamplePluginIE', 'SamplePluginPP']
[debug] Git HEAD: 1e5c83b26
[debug] Python version 3.9.7 (CPython 64bit) - Linux-4.9.0-17-amd64-x86_64-with-glibc2.24
[debug] exe versions: ffmpeg 4.1.2, ffprobe 4.1.2, phantomjs 2.1.1
[debug] Optional libraries: sqlite
[debug] Proxy map: {}
Latest version: 2021.12.27, Current version: 2021.12.27
yt-dlp is up to date (2021.12.27)
[debug] [TikTok] Extracting URL: https://www.tiktok.com/@chloecatalanooo/video/7041197121529203974?_t=8OnUindHzoj
[TikTok] 7041197121529203974: Downloading video details
WARNING: [TikTok] 7041197121529203974: Failed to parse JSON  (caused by JSONDecodeError('Expecting value: line 1 column 1 (char 0)')); please report this issue on  https://github.com/yt-dlp/yt-dlp . Make sure you are using the latest version; see  https://github.com/yt-dlp/yt-dlp  on how to update. Be sure to call yt-dlp with the --verbose flag and include its complete output.; Retrying with webpage
[TikTok] 7041197121529203974: Downloading webpage
[TikTok] 7041197121529203974: Downloading video webpage
ERROR: [TikTok] 7041197121529203974: Unable to extract json_string; please report this issue on  https://github.com/yt-dlp/yt-dlp . Make sure you are using the latest version; see  https://github.com/yt-dlp/yt-dlp  on how to update. Be sure to call yt-dlp with the --verbose flag and include its complete output.; please report this issue on  https://github.com/yt-dlp/yt-dlp . Make sure you are using the latest version; see  https://github.com/yt-dlp/yt-dlp  on how to update. Be sure to call yt-dlp with the --verbose flag and include its complete output.
  File "/opt/yt-dlp/yt_dlp/extractor/common.py", line 599, in extract
    ie_result = self._real_extract(url)
  File "/opt/yt-dlp/yt_dlp/extractor/tiktok.py", line 368, in _real_extract
    json_string = self._search_regex(
  File "/opt/yt-dlp/yt_dlp/extractor/common.py", line 1173, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
coletdjnzcommented, Jan 6, 2022

Yep, duplicate of #2133. Fix is already in master and will be in next release.

1reaction
dirkfcommented, Jan 7, 2022

See also #2133.

The fix for SIGI-type pages appears to be included in the yt-dlp version that gets run as Git HEAD: f5c2c2c9b, and was observed and patched for yt-dl some time ago as well: PR #30224, issue #30251. There have been several commits to the extractor since the release, including the SIGI fix.

$ python3.9 -m yt_dlp -v -F 'https://www.tiktok.com/@chloecatalanooo/video/7041197121529203974?_t=8OnUindHzoj'
[debug] Command-line config: ['-v', '-F', 'https://www.tiktok.com/@chloecatalanooo/video/7041197121529203974?_t=8OnUindHzoj']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, err utf-8, pref UTF-8
[debug] yt-dlp version 2021.12.27 [6223f67a8] (source)
[debug] Lazy loading extractors is disabled
[debug] Plugins: ['SamplePluginIE', 'SamplePluginPP']
[debug] Git HEAD: f5c2c2c9b
[debug] Python version 3.9.7 (CPython 32bit) - Linux-4.4.0-210-generic-i686-with-glibc2.23
[debug] exe versions: avconv 4.3, avprobe 4.3, ffmpeg 4.3, ffprobe 4.3
[debug] Optional libraries: sqlite
[debug] Proxy map: {}
[debug] [TikTok] Extracting URL: https://www.tiktok.com/@chloecatalanooo/video/7041197121529203974?_t=8OnUindHzoj
[TikTok] 7041197121529203974: Downloading video details
[debug] Sort order given by extractor: quality, codec, size, br
[debug] Formats sorted by: hasvid, ie_pref, quality, vcodec, acodec, filesize, fs_approx, tbr, vbr, abr, lang, res, fps, hdr:12(7), asr, proto, vext, aext, hasaud, source, id
[info] Available formats for 7041197121529203974:
ID                    EXT RESOLUTION β”‚    FILESIZE   TBR PROTO β”‚ VCODEC   VBR ACODEC ABR MORE INFO
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
download_addr-0       mp4 576x1024   β”‚     2.33MiB       https β”‚ h264         aac        Download video, watermarked (API)
download_addr-1       mp4 576x1024   β”‚     2.33MiB       https β”‚ h264         aac        Download video, watermarked
download_addr-2       mp4 576x1024   β”‚     2.33MiB       https β”‚ h264         aac        Download video, watermarked
h264_540p_1888257-0   mp4 576x1024   β”‚     2.30MiB 1888k https β”‚ h264   1888k aac     0k Direct video (API)
h264_540p_1888257-1   mp4 576x1024   β”‚     2.30MiB 1888k https β”‚ h264   1888k aac     0k Direct video
h264_540p_1888257-2   mp4 576x1024   β”‚     2.30MiB 1888k https β”‚ h264   1888k aac     0k Direct video
bytevc1_540p_310191-0 mp4 576x1024   β”‚   387.66KiB  310k https β”‚ h265    310k aac     0k Playback video (API)
bytevc1_540p_310191-1 mp4 576x1024   β”‚   387.66KiB  310k https β”‚ h265    310k aac     0k Playback video
bytevc1_540p_310191-2 mp4 576x1024   β”‚   387.66KiB  310k https β”‚ h265    310k aac     0k Playback video
bytevc1_540p_407699-0 mp4 576x1024   β”‚   509.53KiB  407k https β”‚ h265    407k aac     0k Playback video (API)
bytevc1_540p_407699-1 mp4 576x1024   β”‚   509.53KiB  407k https β”‚ h265    407k aac     0k Playback video
bytevc1_540p_407699-2 mp4 576x1024   β”‚   509.53KiB  407k https β”‚ h265    407k aac     0k Playback video
bytevc1_540p_689966-0 mp4 576x1024   β”‚   862.29KiB  689k https β”‚ h265    689k aac     0k Direct video (API)
bytevc1_540p_689966-1 mp4 576x1024   β”‚   862.29KiB  689k https β”‚ h265    689k aac     0k Direct video
bytevc1_540p_689966-2 mp4 576x1024   β”‚   862.29KiB  689k https β”‚ h265    689k aac     0k Direct video
bytevc1_720p_806576-0 mp4 unknown    β”‚  1008.02KiB  806k https β”‚ h265    806k aac     0k Playback video (API)
bytevc1_720p_806576-1 mp4 unknown    β”‚  1008.02KiB  806k https β”‚ h265    806k aac     0k Playback video
bytevc1_720p_806576-2 mp4 unknown    β”‚  1008.02KiB  806k https β”‚ h265    806k aac     0k Playback video
$

Whereas in yt-dl, the extractor tries to get a cookie for the page of interest by fetching https://www.tiktok.com/ and this now times out in all Python versions tested: see https://github.com/ytdl-org/youtube-dl/issues/30251#issuecomment-1006967496.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why Can't I Save a TikTok Video? Here Are 2 Fixes to Solve ...
The most common cause of the issue "can't download a TikTok video" is that the video download option is disabled by the creator....
Read more >
Why can't I save certain videos on TikTok? - Quora
You can't save some videos in Tik Tok because The creator has not allowed people to download their videos. Actually this can be...
Read more >
Can't Save a TikTok Video From the App? Try These Two ...
Open the TikTok app or go to the TikTok website and locate the video you want to download. Β· Tap on the share...
Read more >
Why Can't I Save TikTok Videos? How To Download ... - Bustle
Once you have the video open, simply press down on your screen to pull up an options menu, where you should see β€œsave...
Read more >
Video Downloads - TikTok Help Center
1. Tap Profile in the bottom right to go to your profile. 2. Tap the 3-line icon in the top right to go...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

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

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found