Skip to content

Instantly share code, notes, and snippets.

@GarnetSunset
Created November 28, 2018 21:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GarnetSunset/8aa3d9d7221f68c89a26627457149eab to your computer and use it in GitHub Desktop.
Save GarnetSunset/8aa3d9d7221f68c89a26627457149eab to your computer and use it in GitHub Desktop.
import csv, requests
try: input = raw_input
except NameError: pass
githead = ".git/HEAD"
with open('top500.csv') as csv_file:
csv_reader = csv.reader(csv_file, delimiter=',')
for row in csv_reader:
try:
r = requests.get("https://"+row[0]+githead)
if r.status_code == 200:
print("https://" + row[0] + githead + ": possibly has git head available")
else:
print("https://" + row[0] + ": " + str(r.status_code))
except:
print("https://"+row[0]+" pushed back an error")
##used this https://moz.com/top500
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment