xenova / chat-downloader

A simple tool used to retrieve chat messages from livestreams, videos, clips and past broadcasts. No authentication needed!
https://chat-downloader.readthedocs.io/
MIT License
936 stars 131 forks source link

Chat downloader is broken #207

Closed gadi-playstream-gg closed 1 year ago

gadi-playstream-gg commented 1 year ago

seems like the chat downloader is not working anymore. The word on the internet is that twitch changed their intergrity checks for GQL

anyone else is having this issue?

aiyulu1 commented 1 year ago

i have this issue +1

nio-p commented 1 year ago

@xenova

Could you please fix this problem? I really need your help 🙇

xenova commented 1 year ago

Sure thing - I'll look into this 👍

Also, if someone wants to make a PR, I'd appreciate that too!

nio-p commented 1 year ago

@xenova

Thank you so much ... 🙇 🙇

This link maybe help you. https://github.com/lay295/TwitchDownloader/issues/704

hellishvictor commented 1 year ago

Here (Win x64 SP1) it doesn't download the whole chat, but only the first 50 lines of a VOD.

xenova commented 1 year ago

Okay I have been able to reproduce the issue on my side too. Just to confirm, this only affects VODs, right? Livestreams seem to work fine on my side.

nio-p commented 1 year ago

@xenova

this only affects VODs

maybe not.

You mean, Livesteam = streaming now? If so, this video is streaming now and I can not fetch chats correctly. https://www.twitch.tv/videos/1811939415

I only get 58 chats but more chats in this stream.

xenova commented 1 year ago

https://www.twitch.tv/videos/1811939415

Right - this is a VOD link (even though the stream is still live). The corresponding "livestream" link will be their profile: https://www.twitch.tv/hinanotachiba7

nio-p commented 1 year ago

@xenova

Oh, thanks! It works fine in my env too!

xenova commented 1 year ago

The workaround proposed here is to update the client ID: "kimne78kx3ncx6brgo4mv6wki5h1ko" -> "kd1unb4b3q4t58fwlpcbzcbnm76a8fp" (both of which are public)

If you replace it here:

https://github.com/xenova/chat-downloader/blob/10d8f1fc74a0555f6a50d3353b70ea5a24fb3bce/chat_downloader/sites/twitch.py#L210

does that work for you? Seems to work fine on my end.

nio-p commented 1 year ago

@xenova

Works fine !!!!! I really appreciate it !!

xenova commented 1 year ago

Works fine !!!!! I really appreciate it !!

Great! I'll try make a proper release later today 👍

gadi-playstream-gg commented 1 year ago

How’s changing the id solves the issue? Can u explain?

nio-p commented 1 year ago

@gadi-playstream-gg

For your reference: https://github.com/lay295/TwitchDownloader/issues/704#issuecomment-1535595293

Changing the id is just workaround. Old id kimne78kx3ncx6brgo4mv6wki5h1ko is maybe restricted from Twitch so we use new id that is not restricted.

nio-p commented 1 year ago

@hellishvictor

VOD url please. I will check it !

Edit: My env is macOS 13.3.1 (a) (22E772610a), python 3.10.

hellishvictor commented 1 year ago

@hellishvictor

VOD url please. I will check it !

Edit: My env is macOS 13.3.1 (a) (22E772610a), python 3.10.

Forget it, it works like a charm. Thank you!

aiyulu1 commented 1 year ago

The workaround proposed here is to update the client ID: "kimne78kx3ncx6brgo4mv6wki5h1ko" -> "kd1unb4b3q4t58fwlpcbzcbnm76a8fp" (both of which are public)

If you replace it here:

https://github.com/xenova/chat-downloader/blob/10d8f1fc74a0555f6a50d3353b70ea5a24fb3bce/chat_downloader/sites/twitch.py#L210

does that work for you? Seems to work fine on my end.

thx, that work for me

xenova commented 1 year ago

Thanks for the report 👍

v0.2.5 is out now, and this fixes the issue. https://pypi.org/project/chat-downloader/0.2.5/

You can upgrade using

pip install chat-downloader --upgrade
vvibee commented 1 year ago

@xenova Thanks for that, new client ID works fine. There is another question for me, which is how could we get client-id? Is that the same client-id we get when registered a application on twitch api?

xenova commented 1 year ago

If you really want to use your own client ID, I believe you can find the one linked to your account by inspecting the network traffic in your browser's dev tools. However, that may cause similar issues to what was reported here. In future, it may be necessary to generate the associated integrity key needed for requests.

The ones used by this tool are public and are used by unauthenticated clients (i.e., logged out users).

Is there a specific reason you want to use a different client ID?

vvibee commented 1 year ago

@xenova Yes, your answear is what I confused. If there would be integrity key necessary in future, then generate access token to pass integrity check could be next work to be done. Here is twitch integrity check generator I found that comes with same problem: https://github.com/Kappador/twitch-integrity Twitch restricted it's ID from getting access token. I wonder if using different ID that applied by user themself to generate access token, could it be easier to pass intergrity check and has lower probability to be restricted by Twitch?

gadi-playstream-gg commented 1 year ago

@xenova I've upgraded but it doesn't seem to solve the issue. Anyone else still having issues?

nio-p commented 1 year ago

@gadi-playstream-gg

My app that uses this library works correctly.

Can you paste your full logs?