AlttiRi / twitter-click-and-save

[userscript] Adds buttons to save images and videos in Twitter, also does some other enhancements. (Twitter image and video downloader)
https://greasyfork.org/en/scripts/430132
GNU General Public License v3.0
104 stars 9 forks source link

Failed to download a podcast #43

Closed AlexV525 closed 3 months ago

AlexV525 commented 3 months ago

https://x.com/i/broadcasts/1rmGPoZmRqmKN

userscript.html?name…f-06ae60b36d63:1598 
 GET https://x.com/i/api/graphql/VwKJcAd7zqlBOitPLUrB8A/TweetDetail?variables=%7…ue%2C%22withArticlePlainText%22%3Afalse%2C%22withGrokAnalyze%22%3Afalse%7D 400 (Bad Request)
userscript.html?name…5f-06ae60b36d63:865 
TypeError: Cannot read properties of undefined (reading 'threaded_conversation_with_injections_v2')
    at API.parseTweetJson (userscript.html?name…6ae60b36d63:1626:43)
    at API.getTweetMedias (userscript.html?name…6ae60b36d63:1730:63)
    at async HTMLDivElement._videoClickHandler (userscript.html?name…06ae60b36d63:859:32)
userscript.html?name…5f-06ae60b36d63:869 Uncaught (in promise) 
Error: API.getVideoInfo Error
    at HTMLDivElement._videoClickHandler (userscript.html?name…06ae60b36d63:869:23)
AlttiRi commented 3 months ago

They have no mp4 link. So, it can't be downloaded as other usual videos. There is only HLS (m3u8) playlist. It requires to use an extra library to make from fragments one mp4 file.


BTW, yt-dlp supports downloading of it.


BTW 2:

I personally use the follow alias (yt) in my .bashrc file for yt-dlp:

alias yt='yt-dlp --trim-filenames 240 --write-thumbnail --write-description \
-o "[%(webpage_url_domain)s] %(uploader,creator,playlist_title)s—%(upload_date>%Y.%m.%d)s—%(id)s—%(fulltitle.:160|)s.%(ext)s" \
-o "pl_thumbnail:[%(webpage_url_domain)s][thumbnail] %(uploader,creator,playlist_title)s—%(upload_date>%Y.%m.%d)s—%(playlist_id,id)s—%(fulltitle.:160|)s.%(ext)s"'

So, the result file (downloaded with yt alias command) will have the follow name:

It requires to use a terminal that supports .bashrc file. I use Git Bash one (for Windows).

AlexV525 commented 3 months ago

Cool. Thanks for the clarification.