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 | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
# | User | Contrib. |
---|---|---|
1 | cry | 167 |
2 | maomao90 | 163 |
2 | Um_nik | 163 |
4 | atcoder_official | 161 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | nor | 153 |
9 | 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.