Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

connection refused #66

Open
Long199for opened this issue Dec 1, 2021 · 1 comment
Open

connection refused #66

Long199for opened this issue Dec 1, 2021 · 1 comment

Comments

@Long199for
Copy link

I'm running your example, and got time out on ssl or refused. And I found that even if I use:
import requests
h = {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36",
}
r = requests.get('https://api-testnet.bybit.com/spot/quote/v1/kline?symbol=ETHUSDT&interval=5m', headers=h)

I still got refused.

while if I use:
import urllib.request

req = urllib.request.Request(web, headers=headers_)
data = urllib.request.urlopen(req).read().decode("utf-8",'ignore')
print(data)

I could get the result.
We know that the kline is unauthorized url. So I wonder if requests library is treated as ROBOT ?

@dextertd
Copy link
Collaborator

Please show the full traceroute including the error.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants