Open biggestsonicfan opened 2 years ago
Possibly a result of fixing #4
Possibly no, since in this strange case there is no link (an anchor element <a href="...">
) to the embed tweet.
So the UJS just uses the parent tweet ID (makes API call with "wrong" ID), so it works like before #4.
Well, however, it does not work also for
In this case "Aug 19" text contains the URL.
UPD: It this case the video is a "broadcast". It's not a "normal" video.
Okay, the normal video tweet reposts are still downloaded as earlier:
Your URL is strange since it does not contain the URL to the embed tweet in HTML, so I can't detect the target (correct) tweet ID.
Hm, why is this retweet so special?
However, if I open the embed tweet by the mouse click, it's just a normal video:
https://twitter.com/SpaceX/status/1560707309361172480 is a "broadcast" and it can't be download as a usual video.
BTW, gallery-dl and other downloaders also do not support these URLs (as well as adv URLs).
For example, gallery-dl uses a GraphQL Twitter's API, however, even it do not download the URL.
It seems that I need to use an other API(s) for these rare cases.
UPD: It's not a usual retweet, but a "quoted answer":
Okay, I don't think that it's critical (the userscript still downloads the usual videos and images, in particular, within retweets), so I will try to fix your last two issues some time later.
It seems I just need to use https://twitter.com/i/api/graphql/7i51yEC2i_iurfMKZ8mcNw/TweetDetail
endpoint.
I'm so lazy to do it, but okay.
Also it seems "broadcast"s do not have a ".mp4" URL, only HLS chunks stream (".m3u8" URL).
At least in the https://twitter.com/i/api/1.1/live_video_stream/status/
endpoint that Twitter uses.
Okay, I don't think that it's critical
I completely agree, these are definitely non-critical things, but are just things I would like to bring to your attention to address functionality of the script. Especially if you were never made aware of them, as was the case with the adv tweet.
I greatly appreciate your time and effort in this script, as I avidly used to right-click tweets, but this has made my life much easier!
In perhaps an ironic twist of fate, the ability to save that video is now no longer possible as it has been removed by a copyright takedown. If you have the source information you posted previously saved, you can use that to continue development, else this issue will have to be revisited once a similar tweet is found...
Found a new video that won't download as QRT but downloads fine in the original.
Should be fixed now.
No need to even use GraphQL API.
Inverse just happened with the video as the QRT here.
Seems to be fixed in 06a13b2.
I wish every git repo worked as hard and as fast as you :laughing:
Fixed again. https://github.com/AlttiRi/twitter-click-and-save/commit/92de3f2c0e24dba63e147c9f3823786d5038d7c2 However, it's seems I need to put into the history both tweet IDs: of the original post and of the quoted post for the correct button color displaying.
Possibly a result of fixing #4, the media in the QRT of this tweet cannot be downloaded as a video. The image preview, however, downloads fine.