davidchalifoux / spotify-charts-ripper

Python script for automatically downloading Spotify Charts data.
MIT License
2 stars 1 forks source link

no such element: Unable to locate element: {"method":"css selector","selector":".jEPoVx"} #1

Open tim1f1 opened 1 week ago

tim1f1 commented 1 week ago

Whenever I try running the script, I get the following errors

PS C:\Users\tim_f\spotify-charts-ripper> py main.py

DevTools listening on ws://127.0.0.1:53024/devtools/browser/91043596-a003-4787-add9-2a2294ae8a70 Traceback (most recent call last): File "C:\Users\tim_f\spotify-charts-ripper\main.py", line 62, in main() File "C:\Users\tim_f\spotify-charts-ripper\main.py", line 38, in main elem = driver.find_element(By.CLASS_NAME, "jEPoVx") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\tim_f\AppData\Local\Programs\Python\Python312\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 748, in find_element return self.execute(Command.FIND_ELEMENT, {"using": by, "value": value})["value"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\tim_f\AppData\Local\Programs\Python\Python312\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 354, in execute self.error_handler.check_response(response) File "C:\Users\tim_f\AppData\Local\Programs\Python\Python312\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 229, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":".jEPoVx"} (Session info: chrome=128.0.6613.120); For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception Stacktrace: GetHandleVerifier [0x01188213+26163] (No symbol) [0x01119CC4] (No symbol) [0x010124C3] (No symbol) [0x01057453] (No symbol) [0x0105762B] (No symbol) [0x01096B62] (No symbol) [0x0107AD04] (No symbol) [0x01094661] (No symbol) [0x0107AA56] (No symbol) [0x0104BE89] (No symbol) [0x0104C8CD] GetHandleVerifier [0x0145D313+2996019] GetHandleVerifier [0x014B1B89+3342249] GetHandleVerifier [0x01217AEF+614159] GetHandleVerifier [0x0121F17C+644508] (No symbol) [0x011227FD] (No symbol) [0x0111F6F8] (No symbol) [0x0111F895] (No symbol) [0x01111C16] BaseThreadInitThunk [0x76147BA9+25] RtlInitializeExceptionChain [0x7723C10B+107] RtlClearBits [0x7723C08F+191]

PS C:\Users\tim_f\spotify-charts-ripper>

davidchalifoux commented 1 week ago

Hmm, Spotify might have updated some of their selectors so this script might need an update. I remember having issues when using it on a smaller display. Can you try running it on a larger display or with a lower display scaling?

tim1f1 commented 1 week ago

Hmm, Spotify might have updated some of their selectors so this script might need an update. I remember having issues when using it on a smaller display. Can you try running it on a larger display or with a lower display scaling?

I tried running it with different display scalings, the result seemed to be the same error as above each time.

johnslon commented 10 hours ago

Hmm, Spotify might have updated some of their selectors so this script might need an update. I remember having issues when using it on a smaller display. Can you try running it on a larger display or with a lower display scaling?

I'm having the same issue and can't resolve it with adjusting display or timing.