Skip to content

Instantly share code, notes, and snippets.

@10se1ucgo
Created September 26, 2015 16:25
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 10se1ucgo/8cd3fcba225cf20bc8d4 to your computer and use it in GitHub Desktop.
Save 10se1ucgo/8cd3fcba225cf20bc8d4 to your computer and use it in GitHub Desktop.
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