getaddrinfo failed
generally means that the hostname you are trying to connect to can not be resolved to an IP address. In this case, it probably means that it doesn't exist.
Why?
When you pass socket.connect()
a hostname instead of an IP address, it first needs to find the IP address of said hostname. It does this using socket.getaddrinfo()
, which asks DNS servers for information about the hostname. It turns out that no DNS server has this information, so the call to getaddrinfo
fails, hence the error message.
How to connect to Twitch's IRC
The procedure of connecting to Twitch's IRC has changed a bit since your guide was made, it seems. Here's how I managed to do it.
- Get an OAuth token from TwitchApps
- Connect, with your twitch username, to
irc.twitch.tv
, port 6667. As password, useoauth:
plus the oauth token you just got. - Join the channel you are streaming on.