-
-
Save ritwikSOP/5d1be5e2a09f0c65fa6b to your computer and use it in GitHub Desktop.
Test Gmail's Image Proxy
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/env python | |
import requests | |
counts = {200: 0, 404: 0, 500: 0} | |
for i in range(0,100): | |
r = requests.get("<Insert Google's proxy url for your image here>") | |
if r.status_code in counts: | |
counts[r.status_code] += 1 | |
print "%s Success rate: %s" % (counts, (counts[200]/float(sum(counts.values())))) |
Same url today morning: 0.95
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tested on one of the broken images, and I get:
{200: 77, 500: 5, 404: 17} Success rate: 0.777777777778
at the end.