javascript - Script to check for keyword on website -


i want write script goes trough list of url's checking wheter valid or not.

the page not redirect 404 rather displays sentence 'sorry, not found! if url invalid.

so if script finds sentence, url invalid. if not should valid.

any idea on how realize in js? pointers possible methods in other languages welcome too!

thanks!

a simple python way be:

import requests  urls = ['https://www.google.com'] # fill url in urls:     resp = requests.get(url)     if 'sorry, not found!' in resp.text:         print(url + ' had no page') # or 

Comments

Popular posts from this blog

python - Best design pattern for collection of objects -

go - serving up pdfs using golang -

python - django admin: changing the way a field (w/ relationship to another model) is submitted on a form so that it can be submitted multiple times -