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

Twitter video does not work #5695

Closed
10 tasks done
zackees opened this issue Dec 3, 2022 · 4 comments
Closed
10 tasks done

Twitter video does not work #5695

zackees opened this issue Dec 3, 2022 · 4 comments
Labels
duplicate This issue or pull request already exists

Comments

@zackees
Copy link

zackees commented Dec 3, 2022

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

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

Checklist

Region

USA

Provide a description that is worded well enough to be understood

Twitter video does not work for me in yt-dlp

Repo case:
yt-dlp https://twitter.com/RetroCutsTube/status/1596209604962258945?s=20&t=NBOUsrqJxon-1WJIguegqg

I tried to use the -F and -f options to select the video explicitly and it does not work.

I'm using 2022.11.11.

Fix looks like to be to sanitize the title of the video when saving for a file.

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

$ [debug] Command-line config: ['-vU', 'https://twitter.com/RetroCutsTube/status/1596209604962258945?s=20']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8 
[debug] yt-dlp version 2022.11.11 [8b64402] (pip) 
[debug] Python 3.10.8 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1q  5 Jul 2022) 
[debug] exe versions: ffmpeg 2021-10-30-git-d92fdc7144-essentials_build-www.gyan.dev (setts), ffprobe 5.0-essentials_build-www.gyan.dev 
[debug] Optional libraries: Cryptodome-3.16.0, brotli-1.0.9, certifi-2022.09.24, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4 
[debug] Proxy map: {} 
[debug] Loaded 1723 extractors 
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2022.11.11, Current version: 2022.11.11 
yt-dlp is up to date (2022.11.11) 
[debug] [twitter] Extracting URL: https://twitter.com/RetroCutsTube/status/1596209604962258945?s=20 
[twitter] 1596209604962258945: Downloading guest token 
[twitter] 1596209604962258945: Downloading JSON metadata 
[debug] [twitter] Extracting from video info: 1596200424507326464 
[twitter] 1596209604962258945: Downloading m3u8 information 
[debug] Sort order given by extractor: res, br, size, proto 
[debug] Formats sorted by: hasvid, ie_pref, res, tbr, vbr, abr, filesize, fs_approx, proto, lang, quality, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, asr, vext, aext, hasaud, source, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] 1596200424507326464: Downloading 1 format(s): http-2176
[debug] Invoking http downloader on "https://video.twimg.com/ext_tw_video/1596200424507326464/pu/vid/1280x720/jpsUCtXbz5ONw6hK.mp4?tag=12" 
[download] Unable to open file: [Errno 22] Invalid argument: 'Retro Cuts (M.A)🎚️ - Never gonna give  you up Never gonna let you down Never gonna run around
 and desert you Never gonna make you cry Never gonna say goodbye Never gonna tell a lie and hurt you🎶  Rick Astley - Never Gonna Give You Up (1987)❤️ #Ret
roCutsTube #music [1596200424507326464].mp4.part'. Retrying (1/3)...
[download] Unable to open file: [Errno 22] Invalid argument: 'Retro Cuts (M.A)🎚️ - Never gonna give  you up Never gonna let you down Never gonna run around
 and desert you Never gonna make you cry Never gonna say goodbye Never gonna tell a lie and hurt you🎶  Rick Astley - Never Gonna Give You Up (1987)❤️ #Ret
roCutsTube #music [1596200424507326464].mp4.part'. Retrying (2/3)...
[download] Unable to open file: [Errno 22] Invalid argument: 'Retro Cuts (M.A)🎚️ - Never gonna give  you up Never gonna let you down Never gonna run around
 and desert you Never gonna make you cry Never gonna say goodbye Never gonna tell a lie and hurt you🎶  Rick Astley - Never Gonna Give You Up (1987)❤️ #Ret
roCutsTube #music [1596200424507326464].mp4.part'. Retrying (3/3)...
ERROR: unable to open for writing: [Errno 22] Invalid argument: 'Retro Cuts (M.A)🎚️ - Never gonna give yo u up Never gonna let you down Never gonna run aro
und and desert you Never gonna make you cry Never gonna say goodbye Never gonna tell a lie and hurt you🎶  Rick Astley - Never Gonna Give You Up (1987)❤️ #
RetroCutsTube #music [1596200424507326464].mp4.part'
Traceback (most recent call last):
  File "C:\Users\niteris\dev\transcribe-anything\venv\lib\site-packages\yt_dlp\utils.py", line 640, 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\niteris\dev\transcribe-anything\venv\lib\site-packages\yt_dlp\downloader\http.py", line 267, in download
    ctx.stream, ctx.tmpfilename = self.sanitize_open(
  File "C:\Users\niteris\dev\transcribe-anything\venv\lib\site-packages\yt_dlp\downloader\common.py", line 230, in wrapper
    for retry in RetryManager(self.params.get('file_access_retries'), error_callback, fd=self):
  File "C:\Users\niteris\dev\transcribe-anything\venv\lib\site-packages\yt_dlp\utils.py", line 5921, in __iter__
    self.error_callback(self.error, self.attempt, self.retries)
  File "C:\Users\niteris\dev\transcribe-anything\venv\lib\site-packages\yt_dlp\downloader\common.py", line 223, in error_callback
    return RetryManager.report_retry(
  File "C:\Users\niteris\dev\transcribe-anything\venv\lib\site-packages\yt_dlp\utils.py", line 5929, in report_retry
    raise e
  File "C:\Users\niteris\dev\transcribe-anything\venv\lib\site-packages\yt_dlp\downloader\common.py", line 232, in wrapper
    return func(self, *args, **kwargs)
  File "C:\Users\niteris\dev\transcribe-anything\venv\lib\site-packages\yt_dlp\downloader\common.py", line 243, in sanitize_open
    f, filename = sanitize_open(filename, open_mode)
  File "C:\Users\niteris\dev\transcribe-anything\venv\lib\site-packages\yt_dlp\utils.py", line 643, in sanitize_open
    stream = open(filename, open_mode)
OSError: [Errno 22] Invalid argument: 'Retro Cuts (M.A)🎚️ - Never gonna give you up Never gonna let  you down Never gonna run around and desert you Never g
onna make you cry Never gonna say goodbye Never gonna tell a lie and hurt you🎶  Rick Astley - Never Gonna Give You Up (1987)❤️ #RetroCutsTube #music [1596
200424507326464].mp4.part'
@zackees zackees added site-bug Issue with a specific website triage Untriaged issue labels Dec 3, 2022
@pukkandan
Copy link
Member

#1136 (comment)

@pukkandan pukkandan closed this as not planned Won't fix, can't repro, duplicate, stale Dec 3, 2022
@pukkandan pukkandan added duplicate This issue or pull request already exists and removed site-bug Issue with a specific website triage Untriaged issue labels Dec 3, 2022
@zackees
Copy link
Author

zackees commented Dec 6, 2022

For those hitting this bug, you can do a work around by explicitly saving the output using the title template which apparently does perform sanitation for the filename, add:

-o %(title).%(ext)s

As your output and it should work.

@GoldenMaximo
Copy link

Thanks @zackees

@bhekidaweti
Copy link

For those hitting this bug, you can do a work around by explicitly saving the output using the title template which apparently does perform sanitation for the filename, add:

-o %(title).%(ext)s

As your output and it should work.

How can this be implemented for a web app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

4 participants