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 - What's the Pythonic way to report nonfatal errors in a parser? -

sql server - Deadlock occuring in Clustered Columnstore index -

php - curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to domain.com:443 -