Last active
August 29, 2015 14:08
-
-
Save marshyski/2b08423d3e1ad110e0e1 to your computer and use it in GitHub Desktop.
Grab status from multiple URLs
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
#!/usr/bin/python | |
import requests | |
urls = [ | |
'http://192.168.1.5/', | |
'http://192.168.1.15/', | |
'http://192.168.1.5:8080', | |
] | |
for URL in urls: | |
r = requests.get(URL) | |
print r.url, r.headers['Server'], r.status_code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment