Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebDriver.__init__() got multiple values for argument 'options' #15

Open
MarcoAigner opened this issue May 24, 2024 · 2 comments
Open

Comments

@MarcoAigner
Copy link

Would be really interested in using the scraper but unfortunately wasn't able to run it so far.

  • Installed using pip install paperscraper@git+https://github.com/NLPatVCU/PaperScraper.git
  • Import from paperscraper import PaperScraper worked fine
  • Initializing the scraper (scraper = PaperScraper()) resulted in the following error:

TypeError Traceback (most recent call last)
Cell In[5], line 1
----> 1 PaperScraper()

File d:\paperscraper\paperscraper\PaperScraper.py:45, in PaperScraper.init(self, webdriver_path)
42 if ('webdriver_path' is not None):
43 self.webdriver_path = webdriver_path
---> 45 self.driver = webdriver.Chrome(webdriver_path, options=options)

TypeError: WebDriver.init() got multiple values for argument 'options'

@MoonGirl99
Copy link

Hey I am getting the exact error, Have you found any solution for this issue?

@zakidotai
Copy link

Hey I am getting the exact error, Have you found any solution for this issue?

Step 1: Download the correct chromedriver version same as your google chrome version using the following link

Step 2: In the script, make these changes:

from selenium.webdriver.chrome.service import Service

# After line 44, use this: 

self.driver = webdriver.Chrome(service=Service(webdriver_path), options=options)

Finally, while building the scraper, use the following command in your code:

scraper = PaperScraper(webdriver_path=absolute_path_to_chromedriver)

Note You may encounter more errors while scraping which are related to the source code of the websites being scraped.
You can raise a new issue reporting the link being scraped and the complete error message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants