Open prateek2211 opened 4 years ago
@prateek2211 shouldn't we verify the handle first before fetching the submissions?
Handle verification takes quite significant time. Verifying it everytime we fetch submissions would be too much overkill
Are the response status code for max API limit is exceeded
and handle is invalid
the same?
the status is "failed" in both the cases but the comment is different. Currently we use status to check for api limit, better would be to also add a check on comment
And what about the HTTP status code? I believe they will be different. Rather than matching for the comment, it would be better to check for status code in this case.
@prateek2211 Iss error ka response code toh 400 hai, do you know dusre waale ka kya hai?
I don't really remember it, you could write a loop and cross the limit to see the status code
@Arnesh07 Is this issue resolved?
Currently if the codeforces API gives status which is not "OK", then it retries, assuming that max API limit is exceeded. But status could be not "OK", even if handle is invalid.
https://github.com/mdg-iitr/Codephile/blob/d6bcea4f3e5c2417420e37822c61ca8c0e06c4c8/scrappers/codeforces/scrapper.go#L60
Try this: http://codeforces.com/api/user.status?handle=incorrect-handle&from=500&count=50