gpt4 book ai didi

Python urllib 代理

转载 作者:太空宇宙 更新时间:2023-11-04 06:39:50 26 4
gpt4 key购买 nike

我正在尝试通过 urllib 获取一些 url 并通过我的代理进行 Mechanize 。

使用 mechanize 我尝试以下操作:

from mechanize import Browser
import re

br = Browser()
br.set_proxies({"http": "MYUSERNAME:*******@itmalsproxy.italy.local:8080"})
br.open("http://www.example.com/")

我收到以下错误:

httperror_seek_wrapper: HTTP Error 407: Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied.

作为代理,用户名和密码是正确的,可能是什么问题?

最佳答案

也许代理正在使用 NTLM 身份验证?

如果是这种情况,您可以尝试使用 NTLM Authorization Proxy Server (另请参见 this answer)。

关于Python urllib 代理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1899901/

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