Add buttons to download images and videos in Twitter, also does some other enhancements.
< Commentaires sur Twitter Click'n'Save
It downloads video in both Firefox and Chromium fine based on my tests.
Technically it can't download videos only on mobile.twitter.com
due to CORS, since I use simple fetch
, however, the script has no @match
with mobile.twitter.com
. It runs only on twitter.com
.
There is only a minor bug, that when a video is playing the image download button disappears. That's all. The video download button is still exists and works.
Also there are no GIFs in Twitter, all animations in Twitter are MP4 files.
The video download button can't download "thumbnails". It's not possible. Maybe something wrong with your browser? Or any other extension/userscipt/adblock rule removes video elements? So, in this case my script can only adds the image download button, but not the video one. BTW, the other "broken" userscript also works for me.
Currently it uses the hard coded filename pattern.
Here is the detailed description of the used filename pattern: https://github.com/AlttiRi/twitter-click-and-save#filename-format
In fact the only reason why I have publish this userscript is to popularise such naming approach.
Well, adding a number have a bit of sense. But in the most cases the numbering of the images in tweets is not important at all.
However, adding the author nicknames and the tweet text is a questionable idea.
Authors nicknames mostly look like a garbage and they can be frequently changed, if the author nickname looks good it's most like just duplicates the user_id
.
Especially it's really not good idea to use nickname before user_id
. I would put this thing to the end.
Saving tweet's text in the filename is also not the best thing to do, since it's not a short meaningful title, some important characters can't be saved, and mostly the text can't be saved entirely due to the length limit.
For saving the text description it's better to use gallery-dl with a postprocessor option.
But, yes, if there is some free space in the end of filename, so why not use it for saving any possibly useful information.
I was using another script, but it was broken and then found your fantastic script. thank you, man.
It has a bug after I tested it, it only download the thumbnails of GIF/MP4 files instead of GIF/MP4. tried multiple times and wiped and installed it many times but it just only download the thumbnails.
If the tweet has multiple images it's not append the 1-2-3 to them. (the script i was using add [lsekmo-1.jpg, Iemlkf-2.jpg, jkasek-3.jpg] to the end of files within the same tweet.
Can we have custom filename pattern? I was hoping for
[twitter] {user-name}{@author}—{YYYY.MM.DD}—{id}—{filename}_{tweet text}.{extension}