Marenthyu / NepBot

Waifu Trading Card Game Bot for Twitch
https://waifus.de/help
BSD 3-Clause "New" or "Revised" License
4 stars 6 forks source link

Reimplement FFZ Websocket stuff with websocket-client #22

Open Marenthyu opened 7 years ago

Marenthyu commented 7 years ago

This turns out to be a tiny bit tricky, due to how FFZ and websocket-client handle the Origin Header - FFZ expects the Handshake's Origin header to be a) not set, b) be an empty String or c) be .twitch.tv

This can be worked around for now by setting the origin header to something.twitch.tv until you can omit the header or set it to an empty string with websocket-client ( see https://github.com/websocket-client/websocket-client/issues/368 )

Marenthyu commented 6 years ago

A little context on why this is done in FFZ: https://twitter.com/SirStendec/status/936278949541351425?s=17

Marenthyu commented 6 years ago

https://github.com/websocket-client/websocket-client/issues/368 has been fixed and merged, but a typo prevents it from working. Local install has been made with https://github.com/Marenthyu/websocket-client/tree/patch-1 which works for now, but we should switch to the pyPi version once the issue gets resolved and it pushed there.