(2) Getting the tags for a given problem Id
Even though it's possible to get the tags for a problem via the Codeforces API, it lacks the tag for the rating of the problem which would be quite crucial to have, and hence scraping might be the only viable option. Example,
def get_contest_tags(self, problem_url):
con_soup = self.__get_content_soup(problem_url)
span_tags = con_soup.findAll('span', attrs={'class': 'tag-box'})
return [x.text.strip() for x in span_tags]
To support the use-cases in the project https://github.com/nileshsah/harwest-tool, it'll be great to have additional APIs to support:
(1) Getting a count of the total number of submission-page for a user Could be achieved by scraping the count from the user submissions page, example
(2) Getting the tags for a given problem Id Even though it's possible to get the tags for a problem via the Codeforces API, it lacks the tag for the rating of the problem which would be quite crucial to have, and hence scraping might be the only viable option. Example,