Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upDownload video/GIF #34
Comments
sindresorhus
added
enhancement
help wanted
labels
Dec 23, 2017
This comment has been minimized.
This comment has been minimized.
|
I'll work on it. |
This comment has been minimized.
This comment has been minimized.
|
I did some research and tried. Twitter uses HTTP Live Streaming (HLS) protocol to stream its videos using MPEG Transport Streams (.ts files). Also, their video tags are blob URLs like so – <video
preload="none"
playsinline=""
src="blob:https://twitter.com/13f32643-9f8e-4048-a75a-84d124ba8324">
</video>I can't help but think on the lines of Somehow listen to But at the same time through a simple google search I found https://twdown.net/, which is somehow able to find the .mp4 video file which is streamed on hitting the play button. Twitter doesn't have an API that one could use to fetch .mp4 files anymore. I wonder how they are able to do that, or if it's very obvious I'm missing something. I'm stuck and could use some thought process / resource(s) / direction. |
This comment has been minimized.
This comment has been minimized.
|
@gdad-s-river Yeah, it seems that the only way to provide proper video download, for now, would be to make a call to the old API (1.1), get the tweet data and there we could find the link to the MP4 directly instead of the blob. But that would eventually break if (when) Twitter disables that version of the API. twdown.net most likely uses the old API but even if they didn't, having a backend means they can use something like Maybe focus on image/gif downloads for now and we'll take a look at this later. |
This comment has been minimized.
This comment has been minimized.
I'd be fine with using that. I don't think it will go away anytime soon, and we can deal with it then if so. |
This comment has been minimized.
This comment has been minimized.
|
Great! Let me know if you need any help with this @gdad-s-river! I'll be glad to help! |
sindresorhus commentedDec 23, 2017
Add a button to download the video/GIF in a tweet.