Backend2121 / SimpleGamesDownloader

Python script designed to search and fetch direct download links for games roms
97 stars 5 forks source link

Selenium Common Exception possible iframe issue #12

Open cfoote7 opened 2 years ago

cfoote7 commented 2 years ago

I've been using SGD for a while now and love it. I recently ran into an issue for the first time, It keeps crashing after the search is completed in all 3 modules and I'll see this error message in the console window.

_DevTools listening on ws://127.0.0.1:52152/devtools/browser/04edcee8-335e-4a48-9ac7-180e8b2f474b
Traceback (most recent call last):
  File "C:\Users\Chris Foote\SGD\Modules\Workers\listGamesWorker.py", line 13, in run
    self.done.emit([self.module.listGames(), self.module])
  File "C:\Users\Chris Foote\SGD\Modules\WowRoms.py", line 185, in listGames
    gridContainer = self.browser.find_element_by_xpath("/html/body/div[2]/div/div/section/div[2]/div[5]/ul")
  File "C:\Python38\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 394, in find_element_by_xpath
    return self.find_element(by=By.XPATH, value=xpath)
  File "C:\Python38\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 976, in find_element
    return self.execute(Command.FIND_ELEMENT, {
  File "C:\Python38\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "C:\Python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/div[2]/div/div/section/div[2]/div[5]/ul"}
  (Session info: headless chrome=102.0.5005.115)_
Backend2121 commented 2 years ago

I will look into it, maybe the websites have changed something!

Backend2121 commented 2 years ago

Should be fixed with the new update!