MCPcopy Create free account
hub / github.com/coderick14/ACedIt / scrape_problem

Method scrape_problem

acedit/util.py:466–476  ·  view source on GitHub ↗

Method to scrape a single problem

(self)

Source from the content-addressed store, hash-verified

464 raise NotImplementedError
465
466 def scrape_problem(self):
467 """
468 Method to scrape a single problem
469 """
470 contest = '' if self.site == 'spoj' else self.contest
471 print('Fetching problem %s-%s from %s...' % (contest, self.problem, self.site))
472 req = Utilities.get_html(self.build_problem_url())
473 inputs, outputs = self.parse_html(req)
474 Utilities.store_files(self.site, self.contest,
475 self.problem, inputs, outputs)
476 print('Done.')
477
478 def fetch_html(self, link):
479 r = rq.get(link)

Callers 1

Calls 4

build_problem_urlMethod · 0.95
parse_htmlMethod · 0.95
get_htmlMethod · 0.80
store_filesMethod · 0.80

Tested by

no test coverage detected