Created
May 25, 2021 11:12
-
-
Save z1nc0r3/ad6d83ca052bd906ad5c27f5e9f8ef13 to your computer and use it in GitHub Desktop.
Check bulk of web sites for their availability.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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