makamys / rechat-dl

Simple python script to download Chat Replay messages from Twitch VODs
The Unlicense
25 stars 8 forks source link

Twitch API for the initial video information request changed #7

Open jmbreuer opened 2 years ago

jmbreuer commented 2 years ago

https://github.com/makamys/rechat-dl/blob/942f4b14a667ed7784cee400cceb7d10060368b1/rechat-dl.py#L26

To work as of today, the v5 video request needs some extra massaging:

auth = "OAuth ..." # token easily grabbed from browser devtools, I'm not sure how volatile or personalized this is
cid = "..." # also easily grabbed, needs to match auth above
vod_info = requests.get("https://api.twitch.tv/kraken/videos/v" + sys.argv[1], headers={"Accept": "application/vnd.twitchtv.v
5+json", "Client-ID": cid, "Authorization": auth}).json()

After this small update, the rest of the script worked perfectly to get me a chat transcript I was looking for a timestamp in 😎

makamys commented 2 years ago

I didn't even realize this thing was still (mostly) working, I've completely forgotten about it at this point. I released it into the public domain now, so feel free to fork it. But you might want to use https://github.com/lay295/TwitchDownloader instead as it's still being actively maintained. I'll archive this repo soon.

SebiderSushi commented 2 years ago

I'm just using the script with just a CID and no OAuth token by not getting the vod-info at the start since retrieving messages works with the script as-is...