python: pygooglevoice unable to login

2019-06-07 18:53发布

问题:

I'm trying to use pygooglevoice to send an SMS, but I can't get get authentication to work properly.

I'm using this as an example: https://github.com/jluellen/pygooglevoice/blob/master/examples/sms.py

And this is what I get:

 from googlevoice import Voice
 from googlevoice.util import input
 voice = Voice()
 user_name = "myemail"
 user_pass = "somepassword"
 voice.login(user_name, user_pass)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/googlevoice/voice.py", line 70, in login
    galx = re.search(r"name=\"GALX\"\s+value=\"(.+)\"", content).group(1)
AttributeError: 'NoneType' object has no attribute 'group'

Not entirely sure what I'm doing wrong...

回答1:

Google has terminated their support for XMPP. Hence all the third party API's that use that to communicate with it will fail