PaperScraper icon indicating copy to clipboard operation
PaperScraper copied to clipboard

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

Open MarcoAigner opened this issue 1 year ago • 3 comments

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'

MarcoAigner avatar May 24 '24 09:05 MarcoAigner

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

MoonGirl99 avatar Nov 07 '24 13:11 MoonGirl99

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.

zakidotai avatar Nov 07 '24 18:11 zakidotai

Hi Zakidotai,

I met the same problems for a win32 chromedriver issue. I am wondering after you download the correct chrome version, do you place the downloaded folder of chromedriver in the webdriver folder in this project, or just the .exe file?

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.

ethansun-999 avatar Jan 19 '25 14:01 ethansun-999