spatie / http-status-check

CLI tool to crawl a website and check HTTP status codes
https://freek.dev/308-building-a-crawler-in-php
MIT License
594 stars 89 forks source link

use response status code if available #59

Closed bobemoe closed 4 years ago

bobemoe commented 4 years ago

Adds status code to failed response output.

Before: (Host did not respond)

200 OK - https://xxx.co.uk/test.html
301 Moved Permanently - https://xxx.co.uk/test2-old.html
301 Moved Permanently - http://xxx.co.uk/test2.html
200 OK - https://xxx.co.uk/test2.html
Host did not respond: Not Found - https://xxx.co.uk/test3.html (found on https://xxx.co.uk/test2.html)

Crawling summary
----------------
1 url(s) did have unresponsive host(s)
Crawled 2 url(s) with statuscode 200
Crawled 2 url(s) with statuscode 301

After: (404)

200 OK - https://xxx.co.uk/test.html
301 Moved Permanently - https://xxx.co.uk/test2-old.html
301 Moved Permanently - http://xxx.co.uk/test2.html
200 OK - https://xxx.co.uk/test2.html
404: Not Found - https://xxx.co.uk/test3.html (found on https://xxx.co.uk/test2.html)

Crawling summary
----------------
Crawled 2 url(s) with statuscode 200
Crawled 2 url(s) with statuscode 301
Crawled 1 url(s) with statuscode 404
freekmurze commented 4 years ago

Thanks!