Open 656229093 opened 1 year ago
The original API has been deleted, The new API is to obtain 20 pieces of information in batches. I don’t have the ability to update this. I look forward to your update. Thank you
Oh, fuck, the video downloading do not work.
https://twitter.com/i/api/2/timeline/conversation/${tweetId}.json?tweet_mode=extended
returns 404 now
{"errors":[{"message":"Sorry, that page does not exist","code":34}]}
Twitter delete individual media files API, You can get information in bulk through this interface(return a huge JSON). eg: "/i/api/graphql/Az0-KW6F-FyYTc2OJmvUhg/UserMedia"
I don’t know if this message is useful to you. Look forward to your good news.
Yeah, I curently figure out how to parse the data from https://twitter.com/i/api/graphql/${API.queryId}/TweetDetail?...
.
For example, mp4 url for a tweet with a single video:
data.threaded_conversation_with_injections_v2.instructions[0].entries[0]
.content.itemContent.tweet_results.result.legacy
.extended_entities.media
...
Also, ideally, it would require to automatically get queryId
(Az0-KW6F-FyYTc2OJmvUhg
from your example) from https://abs.twimg.com/responsive-web/client-web-legacy/api.7d71e8ca.js
file.
Since it can expire.
BTW, here is the updated versions of them: https://github.com/fa0311/TwitterInternalAPIDocument/blob/master/docs/json/API.json
@mikf
changes them once per some months:
https://github.com/search?q=repo:mikf/gallery-dl+twitter+update+query+hashes&type=commits
https://github.com/AlttiRi/twitter-click-and-save/commit/42b3daab30649db9f585ae61548f9a36853adc19
const instruction = json.data.threaded_conversation_with_injections_v2.instructions.find(ins => ins.type === "TimelineAddEntries");
const tweetObject = instruction.entries.find(ins => ins.entryId === "tweet-" + tweetId)
const tweetData = tweetObject.content.itemContent.tweet_results.result.legacy;
Possibly, fixed, but I need to test it with different tweet types. I only tested it with a tweet with one video.
For example, I need to fix it again: https://github.com/AlttiRi/twitter-click-and-save/issues/7
OK, the main bug is fixed, I will continue a bit later.
Great!
Possibly related tweet, gif (video) isn't downloading.
Possibly related tweet, gif (video) isn't downloading.
It's "Embedded video". ~I see it first time.~* Seems it's possible to get the URL even without using API, just from HTML.
Currently, I made the simple fix with using API: https://github.com/AlttiRi/twitter-click-and-save/commit/c66f6cf8506f6dced65fd22c201100cf71f8ca53. However, it's better do not use API at all if it's possible.
doesn't work after 3-July-2023 since Twitter is using new API now.