jlplenio / crude-twitch-viewer-bot

Send live viewers to Twitch, youtube and kick with this viewer bot software. The tool offers a user-friendly graphical interface. This program requires HTTP proxies.
GNU Affero General Public License v3.0
329 stars 91 forks source link

Twitch Raid #114

Closed emprx3 closed 1 year ago

emprx3 commented 1 year ago

Hello, first of all I want to thank the creator and collaborators of this project. They did an excellent job! Has anyone been able to effectively solve the incompatibility of the web drivers (chromium - firefox, etc...) regarding the twitch login? This point is to be able to actively participate in a raid. I tried to do it by another means, displaying a request along with the headers that will make you join the raid, adding the account token among them, but it is difficult when capturing them from multiple accounts which makes it unfeasible.

Example:

headers = { 'Accept': '/', 'Accept-Language': 'en-US', 'Authorization': token, 'Client-Id': client_ID, 'Client-Integrity': integrity, 'Client-Session-Id' : client_Session_Id 'Client-Version' Client_Version, 'Connection': 'keep-alive', 'Content-Type': 'text/plain;charset=UTF-8', 'Host': 'gql.twitch.tv', 'Origin': 'https://www.twitch.tv', 'Referer': 'thttps://www.twitch.tv/', 'Sec-Fetch-Dest': 'empty', 'Sec-Fetch-Mode': 'cors', 'Sec-Fetch-Site': 'same-site', 'sec-ch-ua': '"Google Chrome";v="111", "Not(A:Brand";v="8", "Chromium";v="111"', 'sec-ch-ua-mobile': '?0', 'sec-ch-ua-platform': '"Windows"', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36', 'X-Device-Id': Device_ID

}

data = '[{"operationName":"JoinRaid","variables":{"input":{"raidID":"'+raidid+'"}},"extensions":{"persistedQuery":{"version":1,"sha256Hash":"c6a332a86d1087fbbb1a8623aa01bd1313d2386e7c63be60fdb2d1901f01a4ae"}}}]'

response = requests.post('https://gql.twitch.tv/gql', headers=headers, data=data)
jlplenio commented 1 year ago

This all ties into #40. The tinkering is too time-consuming for me. I had the functionality for instances to chat all ready to go. I am hoping for improvements in chrome, playwright, or with scripts.