Kalebu / alright

Python wrapper for WhatsApp web-based on selenium
https://www.youtube.com/watch?v=yitQTt-NukM
MIT License
376 stars 113 forks source link

Unable to use the library #144

Open xxshubhamxx opened 12 months ago

xxshubhamxx commented 12 months ago

I installed the latest version through releases but getting this error:

>>> from alright import WhatsApp
>>> messenger = WhatsApp()

[WDM] - Current google-chrome version is 119.0.6045
[WDM] - Get LATEST driver version for 119.0.6045
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\shubh\Downloads\alright-1.7\alright-1.7\alright\__init__.py", line 38, in __init__
    ChromeDriverManager().install(),
  File "C:\Users\shubh\AppData\Local\Programs\Python\Python39\lib\site-packages\webdriver_manager\chrome.py", line 32, in install
    driver_path = self._get_driver_path(self.driver)
  File "C:\Users\shubh\AppData\Local\Programs\Python\Python39\lib\site-packages\webdriver_manager\manager.py", line 22, in _get_driver_path
    driver_version = driver.get_version()
  File "C:\Users\shubh\AppData\Local\Programs\Python\Python39\lib\site-packages\webdriver_manager\driver.py", line 40, in get_version
    return self.get_latest_release_version()
  File "C:\Users\shubh\AppData\Local\Programs\Python\Python39\lib\site-packages\webdriver_manager\driver.py", line 64, in get_latest_release_version
    validate_response(resp)
  File "C:\Users\shubh\AppData\Local\Programs\Python\Python39\lib\site-packages\webdriver_manager\utils.py", line 79, in validate_response
    raise ValueError("There is no such driver by url {}".format(resp.url))
ValueError: There is no such driver by url http://chromedriver.storage.googleapis.com/LATEST_RELEASE_119.0.6045
TeamGrowai commented 10 months ago
 if not browser:
            s = Service(ChromeDriverManager().install())
            browser = webdriver.Chrome(
                service=s,
                options=self.chrome_options,
            )

modify the code like this