How to extract Handles from rank-list of a specific organization/country?
Is there any way to do it with existing codeforces API? If yes, please tell me how.
# | User | Rating |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3831 |
3 | Radewoosh | 3646 |
4 | jqdai0815 | 3620 |
4 | Benq | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | gamegame | 3386 |
10 | ksun48 | 3373 |
# | User | Contrib. |
---|---|---|
1 | cry | 164 |
1 | maomao90 | 164 |
3 | Um_nik | 163 |
4 | atcoder_official | 160 |
5 | -is-this-fft- | 158 |
6 | awoo | 157 |
7 | adamant | 156 |
8 | TheScrasse | 154 |
8 | nor | 154 |
10 | Dominater069 | 153 |
How to extract Handles from rank-list of a specific organization/country?
Is there any way to do it with existing codeforces API? If yes, please tell me how.
Name |
---|
I expected some comments...
There is no direct method in the API, however, you could load information for users through
users.info
method and then filter byorganization
orcountry
field.You may found useful my library for Codeforces API, written in Python. I've made a script in order to help you with your issue
Thank you very much for your work.....
I don't know python though.... But the Idea may help....
There is a 5 requests/sec limit with codeforces API. tell me, how many API request actually needed to get an organization's handles?
You should made at least
1 + ceil(N / 10 000)
calls to the API, whereN
is the number of distinct user handles in allRanklistRow
objects. In each call ofusers.info
you could pass up to10 000
handles. This may not fit into the length of the url, though, so you may need to use more calls tousers.info
.Then It's not gonna work!!! I need to make a request several times in a day. Actually I need to reorder the ranklist for a specific organization . It would be great if I could extract the handles in 1-10 API requests.
But, Now I find, input those handles manually is a better option!! :(
And what is the problem?
RanklistRow
usingcontest.standings
row.party.members
users.info
RanklistRow
usinguser.organization
field.