2

其他人问了这个问题,但没有回复,所以我再问一次。我正在尝试使用 pygooglevoice API,但是当我运行 SMS.py 示例脚本时,它给了我一个登录错误。我已经安装了 Enthought python,我想也许我还需要安装其他东西才能运行它。我查看了说明,当我尝试手动安装 python-setuptools 因为没有安装 yum 时出现错误。这就是 sms.py 不起作用的原因吗?

4

3 回答 3

2

以下对我有用。我遵循了pygooglevoice 项目讨论板中给出的步骤,评论 #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
于 2013-01-10T19:23:03.960 回答
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然后问题解决了。

于 2013-04-21T02:18:32.917 回答
0

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

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

于 2013-11-24T02:50:57.910 回答