簡體   English   中英

Python get 和 post 請求因 Connection 和 GetAddrinfo 而失敗

[英]Python get and post requests fails with Connection and GetAddrinfo

import requests
r = requests.get('http://http2bin.org/get')

我收到以下錯誤:

raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError:
HTTPConnectionPool(host='http2bin.org', port=80): Max retries exceeded
with url: /get (Caused by
NewConnectionError('<urllib3.connection.HTTPConnection object at
0x031CAB08>: Failed to establish a new connection: [Errno 11004]
getaddrinfo failed'))

可能是什么原因? 它與代理有關嗎?

這是一個網站問題。在另一個網站上嘗試它肯定會起作用。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM