dantleech / fink

PHP Link Checker
MIT License
205 stars 26 forks source link

Add option to save only certain status page (404, 500, etc) #122

Open vdkar opened 2 years ago

vdkar commented 2 years ago

And you can add a parameter so that, for example, only links with the 404 status are saved to the report, for example, to catch non-existing pages.

Thank you

dantleech commented 2 years ago

Fink doesn't really care about filtering results, as this can be done afterwards.

You can use a tool such a jq as detailed in the README:

cat report.json| jq -c '. | select(.status==404) | {url: .url, referrer: .referrer}' | jq

or if you want to do it in "realtime":

fink --stdout https://www.example.com | jq -c '. | select(.status==404) | {url: .url, referrer: .referrer}' | jq