skadogg / personal-tv-guide

Python-based JustWatch scraper
GNU General Public License v3.0
6 stars 7 forks source link

👽 Where did that privacy modal go? #113

Closed skadogg closed 6 months ago

skadogg commented 6 months ago

I got this error just now. It seems that the privacy modal no longer pops up when first opening the site. The code used to accept this / save settings should stick around for now, but it should not be executed.

PS C:\Users\gunner\Documents\git\personal-tv-guide> & c:/Users/gunner/Documents/git/personal-tv-guide/.venv/Scripts/python.exe c:/Users/gunner/Documents/git/personal-tv-guide/run.py

DevTools listening on ws://127.0.0.1:63509/devtools/browser/c45dc8fc-6aed-4bcf-b342-3913639f2fe3
Traceback (most recent call last):
  File "c:\Users\gunner\Documents\git\personal-tv-guide\run.py", line 36, in <module>
    modules.justwatch.remove_already_seen('https://www.justwatch.com/us/lists/my-lists?inner_tab=seenlist')
  File "c:\Users\gunner\Documents\git\personal-tv-guide\modules\justwatch.py", line 370, in remove_already_seen
    driver = open_site_conn()
             ^^^^^^^^^^^^^^^^
  File "c:\Users\gunner\Documents\git\personal-tv-guide\modules\justwatch.py", line 306, in open_site_conn
    modules.auto_sign_in.click_through_privacy_model(driver)
  File "c:\Users\gunner\Documents\git\personal-tv-guide\modules\auto_sign_in.py", line 65, in click_through_privacy_model
    save_settings_button = driver.execute_script(
                           ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\gunner\Documents\git\personal-tv-guide\.venv\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 408, in execute_script
    return self.execute(command, {"script": script, "args": converted_args})["value"]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\gunner\Documents\git\personal-tv-guide\.venv\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 348, in execute
    self.error_handler.check_response(response)
  File "C:\Users\gunner\Documents\git\personal-tv-guide\.venv\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 229, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.JavascriptException: Message: javascript error: Cannot read properties of null (reading 'shadowRoot')
  (Session info: chrome=122.0.6261.95)
Stacktrace:
        GetHandleVerifier [0x00007FF71B9FAD22+56930]
        (No symbol) [0x00007FF71B96F622]
        (No symbol) [0x00007FF71B8242E5]
        (No symbol) [0x00007FF71B829261]
        (No symbol) [0x00007FF71B82B9FD]
        (No symbol) [0x00007FF71B8A8E57]
        (No symbol) [0x00007FF71B88BC9A]
        (No symbol) [0x00007FF71B8A81E2]
        (No symbol) [0x00007FF71B88BA43]
        (No symbol) [0x00007FF71B85D438]
        (No symbol) [0x00007FF71B85E4D1]
        GetHandleVerifier [0x00007FF71BD76AAD+3709933]
        GetHandleVerifier [0x00007FF71BDCFFED+4075821]
        GetHandleVerifier [0x00007FF71BDC817F+4043455]
        GetHandleVerifier [0x00007FF71BA99756+706710]
        (No symbol) [0x00007FF71B97B8FF]
        (No symbol) [0x00007FF71B976AE4]
        (No symbol) [0x00007FF71B976C3C]
        (No symbol) [0x00007FF71B9668F4]
        BaseThreadInitThunk [0x00007FFE0118257D+29]
        RtlUserThreadStart [0x00007FFE01A6AA58+40]

PS C:\Users\gunner\Documents\git\personal-tv-guide> 
skadogg commented 6 months ago

And just noticed that the function is misspelled: click_through_privacy_model should be click_through_privacy_modal.