0

I am building a web crawler that needs access to JS generated content.

Everything works fine.

Basically it is a full blown browser I can communicate with using code. I can execute Javascript code on most sites as well.

However, when do a normal http request to a website, you would always be able to read the status code, 200, 400, 500 and so on.

When doing so through a browser, is it possible to read the status code for the main request using javascript?

mmm
  • 18,431
  • 26
  • 99
  • 165
  • 1
    Please clarify a bit: do you want to know the status code of response, which led to the loaded page? – meskobalazs May 20 '16 at 13:41
  • Yes, exactly, the original source response. – mmm May 20 '16 at 14:43
  • Are you talking about some requests that the page makes or are you talking about the page you open through `page.open(url, cb)` in the context of PhantomJS? If it's the latter, then the duplicate closure is wrong and I would reopen it. The correct duplicate would be [How can I see the HTTP status code from the request made by page.open?](http://stackoverflow.com/q/30221204/1816580) – Artjom B. May 20 '16 at 14:52

0 Answers0