Pygooglevoice登录错误

时间:2012-04-17 21:22:11

标签: python sms

有人问过这个问题,但没有回复,所以我再问一遍。 我正在尝试使用pygooglevoice API但是当我运行SMS.py示例脚本时,它会给我一个登录错误。 我安装了Enthought python,我想也许我还需要安装其他东西以便运行它。我查看了instructions,当我尝试手动安装python-setuptools时,因为没有安装yum,我收到了一个错误。这就是sms.py无法正常工作的原因吗?

3 个答案:

答案 0 :(得分:2)

以下为我效劳。我按照pygooglevoice project discussion board, comment # 17给出的步骤进行了操作。如果从头开始,则下面是步骤。

#Command line Google Voice:
#Updated Jan 10, 2013

#required tools:
sudo apt-get install python python-simplejson python-setuptools
sudo easy_install simplejson

# if gvoice was installed previously, then uninstall it:
sudo rm -r /usr/local/lib/python2.7/dist-packages/googlevoice
sudo rm /usr/local/lib/python2.7/dist-packages/pygooglevoice*

#download pygooglevoice:
wget http://pygooglevoice.googlecode.com/files/pygooglevoice-0.5.tar.gz
tar -xf pygooglevoice-0.5.tar.gz
cd pygooglevoice

# edit settings.py to match correct Google Voice URL on line # 22:
nano googlevoice/settings.py

#correct URL:
LOGIN = 'https://accounts.google.com/ServiceLogin?service=grandcentral'
#you may check if URL is linking to Google Voice login page in browser.
#save and quit settings.py

#install gvoice:
sudo python setup.py install

#Login and make call for the first time:
gvoice # enter login email/pwd
  gvoice> call #follow prompts and make a call
  gvoice>send_sms # or s to send sms
  gvoice>exit #quit gvoice

#After first login, you may like to edit .gvoice for default actions:
sudo nano ~/.gvoice

#end

答案 1 :(得分:2)

我之前遇到过同样的问题。我的版本是0.5(由pip安装),我的系统是OSX 10.8。 在阅读第60期第17期后,我刚刚改变了这条线 LOGIN ='https://www.google.com/accounts/ServiceLoginAuth?service=grandcentral' LOGIN ='https://accounts.google.com/ServiceLogin?service=grandcentral' settings.py 文件中,然后问题解决了。

答案 2 :(得分:0)

我制作了一个目前有效的克隆版(至少用于发送短信):http://code.google.com/r/kkleidal-pygooglevoiceupdate/

问题在于Google更改了登录网址。另外,我在POST请求中添加了一些参数,这可能有助于解决POST请求遇到的一些问题。登录现在应该顺利进行。