ScrapeNinja

부분 유료
분류별 Anthony | 업데이트됨 15 giorni fa | Data
인기

9.9 / 10

지연 시간

3,508ms

서비스 수준

97%

Health Check

N/A

모든 토론으로 돌아가기

why api unreachable?

{“messages”:“The API is unreachable, please contact the API provider”, “info”: “Your Client (working) —> Gateway (working) —> API (not working)”}
I’ve tried several times through the requests and httpx lib ,but it was still unreachable.

Rapid account: Restyler
restyler Commented vor 2 Jahren

From your logs, I see you sometimes send “header” as a non-array (string) instead of “headers” and array ([])
For search engines like google.com and baidu I also recommend to provide “geo” : “ru” like this:

{
“url”: “https://www.google.com”,
“geo”: “ru”,
“headers”: [
“X-Header: some-random-header”
]
}

Rapid account: Yijunli 1105 Jn Maz R Pc Ve
yijunli1105-jnMazRPc-Ve Commented vor 2 Jahren

it’s still not working…is there something wrong with my code?

import requests
url = “https://scrapeninja.p.rapidapi.com/scrape

payload = {
“url”: “https://www.google.com/”,
“header”: [
“X-Header: some-random-header”
]
}
headers = {
‘content-type’: “application/json”,
‘x-rapidapi-host’: “scrapeninja.p.rapidapi.com”,
‘x-rapidapi-key’: “###”
}

response = requests.request(“POST”, url, data=payload, headers=headers)

print(response.text)

Rapid account: Restyler
restyler Commented vor 2 Jahren

hi! I see 502 for your requests but I can’t reproduce it while scraping the same website… apparently this was website or proxies downtime. Can you try again please and let me know?

아래에 의견을 추가하고 토론에 참여하세요.

새 댓글을 게시하려면 로그인 / 가입