Support jpeg and video download in Twitter
-
Image - Get the URL and save it to disk is fine.
-
Video - Get the Video Clip in Twitter website
Download Project:
go get github.com/gohiweeds/twitterdownloader
Install dependency:
go get github.com/grafov/m3u8
go get github.com/Sirupsen/logrus
Run Test command:
go run cmd/main.go -url=https://twitter.com/i/status/1035056498307522560
- provide tweet url which contains video, like
https://twitter.com/i/status/1035056498307522560
- request activate.json twice get guest token
- use guest token request tweet_id.json twice get video config
- request video url to get mp4 file, or m3u8 to get sub-m3u8 or video clips