Can't connect to gtalk with python and xmpppy

2019-08-03 10:53发布

问题:

When try connect to gtalk I get this error:

An error occurred while looking up _xmpp-client._tcp.talk.google.com

The code is here: https://gist.github.com/1396074

回答1:

Do not pass the (incorrect) server name into cl.connect() on line 11. The SRV lookup will go to _xmpp-client._tcp.gmail.com then (taken from the JID), which should work. Passing in a server is only used for incorrectly configured XMPP servers.