下面是:
import requests
url = 'https://www.xbiquke.net'
headers = {
'Host': 'www.xbiquke.net',
'Referer': 'https://www.xbiquke.net/',
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36'
}
response = requests.get(url=url,headers=headers)
下面是返回的错误,这个怎么解决,一直链接不到,但是用ie直接打开网页没有问题,加上cookie也不行
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='www.xbiquke.net', port=443): Max retries exceeded with url: /71_71401/32171269.html (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x0000014D4205F160>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed',))