-
-
Save sauravtom/f8831731e3f218341352 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
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