[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tiktok] ERROR: The extracted extension ('eng-US.creator_caption') is unusual and will be skipped for safety reasons. #10514

Closed
9 of 11 tasks
werid opened this issue Jul 20, 2024 · 1 comment · Fixed by #10516
Labels
regression Works in youtube-dl/older yt-dlp site-bug Issue with a specific website

Comments

@werid
Copy link
werid commented Jul 20, 2024

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

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

Checklist

Region

Earth

Provide a description that is worded well enough to be understood

Some subtitles from tiktok have an unusual extension, and causes the video to not be downloaded since it's raised as an error.

I used --compat-opt allow-unsafe-ext to force the download and it contained the following:

{"utterances":[{"text":"Casey Casey Casey","start_time":853,"end_time":2286,"words":null,"text_size":22,"text_color":"#ffffffff","bg_color":"#00000000","alignment":0,"source_width":0.5533,"source_height":0.0568},{"text":"Alien vs. Predator","start_time":20721,"end_time":22080,"words":null,"text_size":22,"text_color":"#ffffffff","bg_color":"#00000000","alignment":0,"source_width":0.5047,"source_height":0.0568},{"text":" a Mexican arguing with a Catholic priest","start_time":15656,"end_time":19938,"words":null,"text_size":22,"text_color":"#ffffffff","bg_color":"#00000000","alignment":0,"source_width":0.7199,"source_height":0.1047},{"text":"no...","start_time":15133,"end_time":15655,"words":null,"text_size":22,"text_color":"#ffffffff","bg_color":"#00000000","alignment":0,"source_width":0.1547,"source_height":0.0568},{"text":"what do you call a Mexican arguing with a Catholic priest?","start_time":4533,"end_time":9486,"words":null,"text_size":22,"text_color":"#ffffffff","bg_color":"#00000000","alignment":0,"source_width":0.8303,"source_height":0.1047},{"text":"oh my god it's hot","start_time":22081,"end_time":23218,"words":null,"text_size":22,"text_color":"#ffffffff","bg_color":"#00000000","alignment":0,"source_width":0.5065,"source_height":0.0568}]}

Provide verbose output that clearly demonstrates the problem

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

Complete Verbose Output

[debug] Command-line config: ['-vU', '--write-subs', 'https://www.tiktok.com/@gliceron/video/7236544964514123050']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version nightly@2024.07.19.025855 from yt-dlp/yt-dlp-nightly-builds [a3bab4752] (zip)
[debug] Python 3.9.19 (CPython amd64 64bit) - FreeBSD-13.2-RELEASE-p1-amd64-64bit-ELF (OpenSSL 1.1.1w-freebsd  11 Sep 2023, libc 7)
[debug] exe versions: ffmpeg 6.1.1 (setts), ffprobe 6.1.1, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.15.0, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, requests-2.32.3, sqlite3-3.46.0, urllib3-2.1.0, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets
[debug] Plugin directories: ['/home/weird/.local/lib/python3.9/site-packages/yt_dlp_plugins']
[debug] Loaded 1829 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-nightly-builds/releases/latest
Latest version: nightly@2024.07.19.025855 from yt-dlp/yt-dlp-nightly-builds
yt-dlp is up to date (nightly@2024.07.19.025855 from yt-dlp/yt-dlp-nightly-builds)
[TikTok] Extracting URL: https://www.tiktok.com/@gliceron/video/7236544964514123050
[TikTok] 7236544964514123050: Downloading webpage
[debug] [TikTok] Found universal data for rehydration
[info] 7236544964514123050: Downloading subtitles: eng-US
[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] 7236544964514123050: Downloading 1 format(s): bytevc1_1080p_1516867-1
ERROR: The extracted extension ('eng-US.creator_caption') is unusual and will be skipped for safety reasons. If you believe this is an error, please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
Traceback (most recent call last):
  File "/home/weird/bin/yt-dlp-nightly/yt_dlp/YoutubeDL.py", line 179, in wrapper
    return func(self, *args, **kwargs)
  File "/home/weird/bin/yt-dlp-nightly/yt_dlp/YoutubeDL.py", line 3271, in process_info
    sub_files = self._write_subtitles(info_dict, temp_filename)
  File "/home/weird/bin/yt-dlp-nightly/yt_dlp/YoutubeDL.py", line 4328, in _write_subtitles
    sub_filename = subtitles_filename(filename, sub_lang, sub_format, info_dict.get('ext'))
  File "/home/weird/bin/yt-dlp-nightly/yt_dlp/utils/_utils.py", line 1262, in subtitles_filename
  File "/home/weird/bin/yt-dlp-nightly/yt_dlp/utils/_utils.py", line 2097, in _change_extension
  File "/home/weird/bin/yt-dlp-nightly/yt_dlp/utils/_utils.py", line 5167, in sanitize_extension
yt_dlp.utils._UnsafeExtensionError: unsafe file extension: 'eng-US.creator_caption'
@werid werid added site-bug Issue with a specific website triage Untriaged issue labels Jul 20, 2024
@bashonly bashonly added bug Bug that is not site-specific regression Works in youtube-dl/older yt-dlp and removed triage Untriaged issue bug Bug that is not site-specific labels Jul 20, 2024
@bashonly
Copy link
Member
bashonly commented Jul 21, 2024

Thanks for reporting this; will be fixed by #10516

It looks like webvtt subs (with the same text) are available for most(/all?) videos that have these JSON subs, so you could use --sub-format vtt as a workaround until the PR is merged & you update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression Works in youtube-dl/older yt-dlp site-bug Issue with a specific website
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants