Last active
August 29, 2015 14:20
-
-
Save sc68cal/4117f6702352221710f2 to your computer and use it in GitHub Desktop.
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
>>> API_ENDPOINT | |
'https://api.phila.gov/bike-share-stations/v1' | |
>>> r = requests.get(url=API_ENDPOINT) | |
>>> r.ok | |
False | |
>>> r.content | |
'<html>\r\n<head><title>403 Forbidden</title></head>\r\n<body bgcolor="white">\r\n<center><h1>403 Forbidden</h1></center>\r\n<hr><center>nginx</center>\r\n</body>\r\n</html>\r\n' | |
>>> r = requests.get(API_ENDPOINT, headers={'User-Agent': 'curl/7.37.1'}) | |
>>> r.ok | |
True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment