node
백엔드에서 타사 API 서비스에 GET
을 요청하고 있습니다.노드에서 GET 요청이 실패했습니다.
request("http://www.giantbomb.com/api/search/?api_key=my_api_key&field_list=name,image,id&format=json&limit=1&query=street%20fighter%203&resources=game",(err,res,body) => {
console.log(body);
})
브라우저에서 동일한 요청 예상 된 결과를 반환하는 쿼리 :
나는 403 forbidden
의 반응을 얻고있다.
이것이 일어날 수있는 이유는 무엇입니까?
편집 : 응답 본체 로깅은
, I합니다 (JS없이) 다음 페이지가 나타납니다
이<h1>Wordpress RSS Reader, Anonymous Bot or Scraper Blocked</h1>
<p>
Sorry we do not allow WordPress plugins to scrape our site. They tend to be used maliciously to steal our content. We do not allow scraping of any kind.
You can load our RSS feeds using any other reader but you may not download our content.
<a href='/feeds'>Click here more information on our feeds</a>
</p>
<p>
Or you're running a bot that does not provide a unique user agent.
Please provide a UNIQUE user agent that describes you. Do not use a default user agent like "PHP", "Java", "Ruby", "wget", "curl" etc.
You MUST provide a UNIQUE user agent. ...and for God's sake don't impersonate another bot like Google Bot that will for sure
get you permanently banned.
</p>
<p>
Or.... maybe you're running an LG Podcast player written by a 10 year old. Either way, Please stop doing that.
</p>
해당 URL의 형식이 잘못되었습니다. 왜 쿼리 매개 변수 앞에 슬래시가 있습니까? 소프트웨어가 브라우저에 사용하고있는 URL을 로깅, 복사 및 붙여 넣기하는 것을 고려 했습니까? 아니면 다시 입력 했습니까? – jonrsharpe
내 코드에서와 똑같이 복사하여 브라우저에 붙여 넣습니다. 브라우저에서 슬래시를 제거하려고했지만 요청을 보낼 때 다시 추가되었습니다. – itaied
브라우저 (쿠키 등)에 어떤 상태가 있습니까? 아직 익명의 브라우저 창에서 작동합니까? – jonrsharpe