【发布时间】:2013-07-06 13:30:40
【问题描述】:
我正在编写一个 python (2.7.3) 脚本,它将定期从运行 Raspbian 的 Raspberry Pi 登录到 Mint.com。但是,我的脚本挂在 SSL 握手上以下代码在运行 Python 2.7.3 的 OSX 上运行良好:
import mechanize
br = mechanize.Browser()
br.open("https://wwws.mint.com/login.event")
但是,当我在运行 Python 2.7.3 的 Raspberry Pi 上运行完全相同的代码时,open 永远不会返回。当我取消运行 (ctrl+c) 时,我得到一个很长的回溯,以:
File "/usr/lib/python2.7/ssl.py", line 305, in do_handshake
self._sslobj.do_handshake()
我打开https://www.mint.com 没有任何问题,所以看来问题是login.event,这是提交登录凭据所必需的。
知道为什么会这样吗?
【问题讨论】:
标签: python ssl mechanize raspberry-pi raspbian