CrapTheCoder / UpCode

Upload accepted solutions from CodeChef and CodeForces to GitHub
45 stars 15 forks source link

Issue when using main.py for codeforces solutions #12

Closed ApooU2 closed 1 year ago

ApooU2 commented 1 year ago

Hi, I am facing this error when running the program main.py", line 130, in main codeforces_uploader(codeforces_username, repo) main.py", line 75, in codeforces_uploader for solution in CodeForcesScraper.get_solutions(codeforces_username): CodeForcesScraper.py", line 76, in get_solutions pages = int(driver.find_elements(By.CSS_SELECTOR, '#pageContent > div > ul > li > span')[-1].text) IndexError: list index out of range

CrapTheCoder commented 1 year ago

Sorry, I couldn't recreate the error. Can you tell me your CodeForces username?

CrapTheCoder commented 1 year ago

Okay, got the issue. When there is only one page, the scraper fails. The issue has been fixed now, please try using the updated code!