zedeus / nitter

Alternative Twitter front-end
https://nitter.net
GNU Affero General Public License v3.0
10.15k stars 538 forks source link

Getting video links with curl requests of nitter pages #874

Closed NicoBerlo closed 1 year ago

NicoBerlo commented 1 year ago

Hi I’m currently using a nitter scraper on my nitter instance. It works fine for everything but for tweets that include videos, the video url isn’t included in the basic html. Only a video thumbnail is shown. It only works when the html is interpreted in a browser window.

I wish there was a way to include a video link in the basic html returned by nitter.

Or maybe there’s a way to reach it ?

thanks

zedeus commented 1 year ago

The video link is included as a streamable m3u8 link in the html if HLS playback is enabled. If the instance has it disabled by default, you can include a simple cookie with curl curl https://nitter.net/elonmusk -H 'cookie: hlsPlayback=on' | grep m3u8