Last active
January 30, 2019 11:46
-
-
Save diveshuttam/83f75949c79011704fd722b59276919c to your computer and use it in GitHub Desktop.
Flipkart-GRiD-Teach-The-Machines-2019
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
#!bin/bash | |
[[ -d "urls" ]] && echo "Urls directory already exists. Please delete it first" && exit 1 | |
python3 urllist.py | |
wget -i urls.txt -P ./urls/ | |
python3 rescalc.py | tee final_results.csv # use this csv to do all kinds of manupliations using excel |
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 json | |
import os | |
res=[] | |
for i in os.listdir("urls"): | |
x=json.load(open(os.path.join("./urls",i))) | |
res.extend(x['data']['results']) | |
for i in res: | |
tp=[ | |
i["rank"], | |
i["team_name"], | |
i['team']['players'][0]['organisation'], | |
i['score'], | |
i['finish_time'] | |
] | |
print(*('"{}"'.format(item) for item in tp), sep=",") |
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
f=open("urls.txt","w") | |
for i in range(73): | |
f.write(''.join(["https://api.dare2compete.com/api/get-quiz-results/2024?page=",str(i),"\n"])) |
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
https://api.dare2compete.com/api/get-quiz-results/2024?page=0 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=1 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=2 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=3 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=4 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=5 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=6 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=7 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=8 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=9 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=10 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=11 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=12 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=13 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=14 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=15 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=16 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=17 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=18 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=19 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=20 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=21 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=22 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=23 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=24 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=25 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=26 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=27 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=28 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=29 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=30 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=31 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=32 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=33 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=34 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=35 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=36 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=37 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=38 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=39 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=40 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=41 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=42 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=43 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=44 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=45 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=46 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=47 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=48 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=49 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=50 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=51 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=52 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=53 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=54 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=55 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=56 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=57 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=58 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=59 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=60 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=61 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=62 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=63 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=64 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=65 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=66 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=67 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=68 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=69 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=70 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=71 | |
https://api.dare2compete.com/api/get-quiz-results/2024?page=72 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment