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

tweet includes a video accompanied with picture(s) #31993

Closed
4 of 5 tasks
TwitterToTelegram opened this issue Apr 4, 2023 · 3 comments
Closed
4 of 5 tasks

tweet includes a video accompanied with picture(s) #31993

TwitterToTelegram opened this issue Apr 4, 2023 · 3 comments

Comments

@TwitterToTelegram
Copy link

TwitterToTelegram commented Apr 4, 2023

Checklist

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dl version 2021.12.17
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar issues including closed ones

Verbose log

[twitter] 1643027903897010178: Downloading guest token
[twitter] 1643027903897010178: Downloading JSON metadata
[twitter] 1643027903897010178: Downloading JSON metadata
[twitter] 1643027903897010178: Downloading JSON metadata
[twitter] 1643027903897010178: Downloading JSON metadata
.
.
.
[twitter] 1643027903897010178: Downloading JSON metadata
ERROR: Unable to download JSON metadata: HTTP Error 429: Too Many Requests

Description

On Twitter, if a tweet includes two videos or includes a video that is accompanied by pictures, it constantly says "Downloading JSON metadata" on Python 3.9.9 executed using VS Code. And at the end, the video is not downloaded.

Example tweet's URL given to youtb-dl:

https://twitter.com/Aiydin4KSTUV/status/1643027903897010178

The tweet includes a short url as "https://t.co/06IqPawxe8" that if expanded becomes "https://twitter.com/Aiydin4KSTUV/status/1643027903897010178/video/1". Giving the expanded url did not work either.

The Python code is:

import youtube_dl
wlink=r"https://twitter.com/Aiydin4KSTUV/status/1643027903897010178"
ydl_opts = {'outtmpl': filename
,'forceduration':True
,'quiet': False}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
ydl.download([wlink])

@dirkf
Copy link
Contributor

dirkf commented Apr 4, 2023

I think this is #31281, which will be fixed once someone gets around to back-porting the yt-dlp extractor and assuming that Twitter is still operating and still offering the APIs used by the extractor.

@october262
Copy link

if you just want the video, click on where it says share - click copy link to tweet
and do youtube-dl -o '%(title).20s' "https://twitter.com/Aiydin4KSTUV/status/1643026535790551040?s=20"
to download the video. you may have to add .mp4 to the end of the file name once it is downloaded.

@dirkf
Copy link
Contributor

dirkf commented Apr 7, 2023

Closing as duplicate of #31281.

@dirkf dirkf closed this as not planned Won't fix, can't repro, duplicate, stale Apr 7, 2023
@dirkf dirkf added the duplicate label Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants