aprikyan / google-books-downloader

An open-source utility to scrape Google Books
MIT License
65 stars 14 forks source link

Do not work in Linux #13

Open lobaluna opened 2 years ago

lobaluna commented 2 years ago

I'm not on Windows. I believe this is the reason why I get this error:

~/bin $ python gbd.py 

Google Books Downloader by @aprikyan, 2020.
 .   .   .   .   .   .   .   .   .   .   .

Traceback (most recent call last):
  File "/mnt/Data/bin/gbd.py", line 244, in <module>
    driver = webdriver.Chrome("chromedriver.exe", options=chrome_options)
  File "/home/simonapetra/.local/lib/python3.10/site-packages/seleniumwire/webdriver.py", line 206, in __init__
    super().__init__(*args, **kwargs)
  File "/home/simonapetra/.local/lib/python3.10/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in __init__
    self.service.start()
  File "/home/simonapetra/.local/lib/python3.10/site-packages/selenium/webdriver/common/service.py", line 72, in start
    self.process = subprocess.Popen(cmd, env=self.env,
  File "/usr/lib/python3.10/subprocess.py", line 966, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1842, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: 'chromedriver.exe'

Can you confirm or advice how to solve this error, please?

marieell commented 2 years ago

You can just replace chromedriver.exe with chromedriver on line 244 in gbd.py. You might need to install chromedriver if you don't have, yet.

bonnebulle commented 1 year ago

Hello I installed chromedriver but now I have this error (same one)

python3 ./gbd.py
Traceback (most recent call last):
  File "/HOME_INSTALL/google-books-downloader/./gbd.py", line 6, in <module>
    from seleniumwire import webdriver
  File "/HOME/.local/lib/python3.11/site-packages/seleniumwire/webdriver.py", line 23, in <module>
    from selenium.webdriver import EdgeOptions
ImportError: cannot import name 'EdgeOptions' from 'selenium.webdriver' (/HOME/.local/lib/python3.11/site-packages/selenium/webdriver/__init__.py)

It is this one I need to install : https://pypi.org/project/chromedriver-py/ ? Do I need to specify "chromedriver" or "chromedriver-py" in gbd.py ?

Do you have any clue for me ? Thanks, amazing work here !