File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -528,8 +528,8 @@ def scrape_problem(self):
528
528
Method to scrape a single problem from codeforces
529
529
"""
530
530
print 'Fetching problem ' + self .contest + '-' + self .problem + ' from Codeforces...'
531
- url = 'http://codeforces.com/ contest/' + \
532
- self . contest + '/ problem/' + self .problem
531
+ type = 'contest' if int ( self . contest ) <= 100000 else 'gym'
532
+ url = 'http://codeforces.com/%s/%s/ problem/%s' % ( type , self .contest , self . problem )
533
533
req = Utilities .get_html (url )
534
534
inputs , outputs = self .parse_html (req )
535
535
Utilities .store_files (self .site , self .contest ,
@@ -541,7 +541,8 @@ def scrape_contest(self):
541
541
Method to scrape all problems from a given codeforces contest
542
542
"""
543
543
print 'Checking problems available for contest ' + self .contest + '...'
544
- url = 'http://codeforces.com/contest/' + self .contest
544
+ type = 'contest' if int (self .contest ) <= 100000 else 'gym'
545
+ url = 'http://codeforces.com/%s/%s' % (type , self .contest )
545
546
req = Utilities .get_html (url )
546
547
links = self .get_problem_links (req )
547
548
You can’t perform that action at this time.
0 commit comments