DedInc / pyanty

Python module for controlling Dolphin browser profiles using Selenium, Pyppeteer, and Playwright. Includes Dolphin API for profile management.
https://pypi.org/project/pyanty
MIT License
45 stars 14 forks source link

get driver not work #7

Closed FreeM1ne closed 8 months ago

FreeM1ne commented 8 months ago

I think the reason is that I don't have the drivers for the browser, it used to download, but now it doesn't

Traceback (most recent call last):
  File "C:\Users\test.py", line 3, in <module>
    browser = dolphin.get_driver(port=int(open('port.txt', 'r').read()))
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\venv\Lib\site-packages\selenium_dolphin\selenium_dolphin.py", line 71, in get_driver
    driver_path = get_dolphin_driver()
                  ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\venv\Lib\site-packages\selenium_dolphin\selenium_dolphin.py", line 36, in get_dolphin_driver
    version = driver_slices[1].split('"')[0]
              ~~~~~~~~~~~~~^^^
IndexError: list index out of range
DedInc commented 8 months ago

The problem was that on the dolphin site they removed docs and the basic automation page in particular, it turns out that you can no longer parse the driver link from there, in the new release corrected it

FreeM1ne commented 8 months ago

Change the code to swap the zip into memory, i.e. there will be no unnecessary archives You can also use response.content instead of the stream download function Since the archive is small.