gpt4 book ai didi

Raspbian 上的 Python Mechanize

转载 作者:太空宇宙 更新时间:2023-11-03 13:28:11 25 4
gpt4 key购买 nike

我正在编写一个 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,这是必要的以便提交登录凭据。

知道为什么会这样吗?

最佳答案

我在使用 Ubuntu LTS 12.04 时遇到过这样的问题。我在运行最新 Mint Debian 版本(订阅传入存储库)的机器上尝试了相同的代码,问题已解决。

关于Raspbian 上的 Python Mechanize ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17503447/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com