Python Google Voice

↘锁芯ラ 提交于 2019-12-30 03:34:07

问题


I am using the google voice API from here, and trying to send text messages from Python. However, whenever I try to log in using this code, I get something I do not expect:

from googlevoice import tests
from googlevoice import Voice
from googlevoice.util import input

def login():
    username, password = "xyz@gmail.com", "******"
    client = Voice.login(username, password)
    return client

Upon starting this code's parent program (a file that literally just says run this sketch), I get this prompt:

Email Address: 

If I enter an email address, it just freezes. Any help would be greatly appreciated.

I've read a few places that the Google Voice API support is coming to an end/has ended and am wondering if this is why I'm getting an error... If so, are there any free alternatives that are python compatible? I don't want to pay to have to text from my computer!


回答1:


Somehow, this has made it work now:

from googlevoice import Voice
from googlevoice.util import input
import sys
import BeautifulSoup
import fileinput

import Listen #A voice recognition script I wrote

def login():
    username, password = "xyz@gmail.com", "******"

    voice = Voice()
    client = voice.login(username, password)
    return client

The only thing different that I've done is changed some of the libraries I've imported, but I can finally get past that "Email Address: " error, and run the rest of my code. have yet to try and test it my sending a text yet though!

@Merlin2011 and @jknupp17, thank you so much for your suggestions!



来源:https://stackoverflow.com/questions/41529061/python-google-voice

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!