Skip to content

Instantly share code, notes, and snippets.

@z1nc0r3
Created May 25, 2021 11:12
Show Gist options
  • Save z1nc0r3/ad6d83ca052bd906ad5c27f5e9f8ef13 to your computer and use it in GitHub Desktop.
Save z1nc0r3/ad6d83ca052bd906ad5c27f5e9f8ef13 to your computer and use it in GitHub Desktop.
Check bulk of web sites for their availability.
import requests
file = open('a.txt', 'r')
lines = file.readline()
count = 1
while lines:
url = "https://{}".format(lines.strip())
try:
req = requests.get(url)
response = str(req)
except:
response = '<Response [404]>'
print("Skipped URL : " + url)
if response == '<Response [200]>':
print(url)
else:
pass
count += 1
lines = file.readline()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment