chrippa / livestreamer

Command-line utility that extracts streams from various services and pipes them into a video player of choice. No longer maintained, use streamlink or youtube-dl instead.
http://livestreamer.io/
BSD 2-Clause "Simplified" License
3.88k stars 586 forks source link

How does Twitch or the Browser(?) generate the client-id? #1670

Open Nado15 opened 4 years ago

Nado15 commented 4 years ago

Hey guys,

I have a question its not an actually issue. I have looked up some things of how the Browser is actually communicating with the Twitch API and I saw that a client-id is passed to twitch. And its all the time the same client-id even if I am using a private window on firefox.

I checked on the internet and I saw that the following client-id

client-id: jzkbprff40iqj646a697cyrvl0zt2m6

is quite common. Even in livestreamer it's hardcoded. Even if I analyse the HAR content the Client-ID is just there. There is no answer from twitch that is passing an ID

I am just wondering how this happens for someone who is using twitch for the first time.

Thanks and best regards

cdrage commented 4 years ago

Use: https://github.com/streamlink/streamlink

Nado15 commented 4 years ago

Check this new merge request: https://github.com/streamlink/streamlink/commit/6c12a5e77a9440acd22e0e98941fd330ac7b7bca

The client-id is hardcoded and it changed again, so I guess twitch is changing this id after some months and the id is for all clients the same