小编ali*_*rdi的帖子

超过 url 的最大重试次数:/由 ProxyError 引起

我想从这个网页获取一些代理列表;https://free-proxy-list.net/ 但我陷入了这个错误,不知道如何解决。

requests.exceptions.ProxyError: HTTPSConnectionPool(host='free-proxy-list.net', port=443): Max retries exceeded with url: / (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x00000278BFFA1EB0>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected 
party did not properly respond after a period of time, or established connection failed because connected host has failed to respond')))
Run Code Online (Sandbox Code Playgroud)

顺便说一句,这是我的相关代码:

import urllib
import requests
from bs4 import BeautifulSoup
from fake_useragent import UserAgent
ua = UserAgent(cache=False)
header = {
    "User-Agent": str(ua.msie)
    } …
Run Code Online (Sandbox Code Playgroud)

python beautifulsoup web-scraping python-requests

5
推荐指数
1
解决办法
2万
查看次数