Created
September 26, 2015 16:25
-
-
Save 10se1ucgo/8cd3fcba225cf20bc8d4 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
import requests | |
import json | |
r = requests.get('https://api.github.com/repos/10se1ucgo/DisableWinTracking/releases') | |
total_count = 0 | |
if r.ok: | |
jsonobj = json.loads(r.text or r.content) | |
for releases in jsonobj: | |
for asset in releases['assets']: | |
print "{0}: {1} downloads".format(releases['tag_name'], asset['download_count']) | |
total_count += asset['download_count'] | |
print "Total: {0} downloads".format(total_count) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment