Skip to content

Instantly share code, notes, and snippets.

@sauravtom
Created October 1, 2014 05: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 sauravtom/f8831731e3f218341352 to your computer and use it in GitHub Desktop.
Save sauravtom/f8831731e3f218341352 to your computer and use it in GitHub Desktop.
import requests
domain="zysten.net aok.de apotheke.de arthrose.de www.zuckerkuegelchen.de"
domains = domain.split(" ")
def main(domain):
url = "http://api.similarweb.com/Site/%s/v1/visits?gr=daily&start=9-2013&end=5-2014&md=true&Format=JSON&UserKey=16b3af1ddf135f22b90c0243fdfe3c2b"%domain
f = requests.get(url)
sum = 0
for i in f.json()['Values']:
sum = sum + i['Value']
print "%s | %s "%(domain,sum)
if __name__ == '__main__':
for domain in domains:
main(domain)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment