twitter-video-downloader-extension
twitter-video-downloader-extension copied to clipboard
Button is gone
Seems that twitter updated their css/layout or something and now the button is gone.
Any chance for any update?
Hi @solserer-labs,
Twitter api url has changed. Update here https://github.com/mstfsnc/twitter-video-downloader-extension/commit/b3bbc6fe399ae6cb8e49cedc59c9325fffefd447
Hello, I've been using your extension as a guide to try to write a simple tweet request. It is way over my knowledge but I could get the json for a tweet by id without authentification with this request :
https://twitter.com/i/api/2/timeline/conversation/${id}.json?tweet_mode=extended
could you help me to rewrite this with the new url type or head me in the right direction ?
function FetchPost ( id, headers = {} )
{
let url = `https://twitter.com/i/api/2/timeline/conversation/${id}.json?tweet_mode=extended`
return fetch ( url, { credentials: "include", headers: new Headers(headers), } )
.then ((response) => response.json())
}
Hi @gpuido,
There is no way to request api without authentication. In the old version, I was using some headers while trying to make a request to the api.
Thank you for the help @mstfsnc,
Oh, i think I understand how you do it the new version ! very smart !!
You don't do the request yourself, but you intercept the response request made by twitter.com to twitter api ?
you analyse every XMLHttpRequest in xhr.js and callback your code with the obj when url match api.twitter.com.
This is beautifull code. Do I understand right ?
Thank you for the help @mstfsnc,
Oh, i think I understand how you do it the new version ! very smart !!
You don't do the request yourself, but you intercept the response request made by twitter.com to twitter api ?
you analyse every XMLHttpRequest in xhr.js and callback your code with the obj when url match api.twitter.com.
This is beautifull code. Do I understand right ?
Yes, absolutely right.
Thank you very much for sharing @mstfsnc. 🙏
One idea I use in many of my tools, you might find interesting is ::
when the user click the download button, IF some text is selected, the extension use the selected text ( filter window.getSelection().toString() ) to define the filename to save ( "Pelé's bicycle kick against the Miami Toros in 1976.mp4" )
I find it very usefull to quickly give a not too long and meaningful file name without typing.
Button has disappeared again, probably due twitter's API