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

[Linux] Web-driver exits unexpectedly using CustomGoogleScholarOrganic() #7

Closed
Doloroy opened this issue Apr 22, 2023 · 5 comments
Closed
Labels
help wanted Extra attention is needed ✅issue-resolved

Comments

@Doloroy
Copy link

Doloroy commented Apr 22, 2023

Traceback (most recent call last):
File "/mnt/c/Users/enarevbd/Documents/scraping_files/scrape-google-scholar-py/first_query.py", line 9, in
custom_parser_get_organic_results = CustomGoogleScholarOrganic().scrape_google_scholar_organic_results(
File "/mnt/c/Users/enarevbd/Documents/scraping_files/scrape-google-scholar-py/google_scholar_py/custom_backend/organic_search.py", line 122, in scrape_google_scholar_organic_results
driver = webdriver.Chrome(service=service, options=options)
File "/home/doloroy/.local/lib/python3.10/site-packages/selenium/webdriver/chrome/webdriver.py", line 80, in init
super().init(
File "/home/doloroy/.local/lib/python3.10/site-packages/selenium/webdriver/chromium/webdriver.py", line 101, in init
self.service.start()
File "/home/doloroy/.local/lib/python3.10/site-packages/selenium/webdriver/common/service.py", line 104, in start
self.assert_process_still_running()
File "/home/doloroy/.local/lib/python3.10/site-packages/selenium/webdriver/common/service.py", line 117, in assert_process_still_running
raise WebDriverException(f"Service {self.path} unexpectedly exited. Status code was: {return_code}")
selenium.common.exceptions.WebDriverException: Message: Service /home/doloroy/.wdm/drivers/chromedriver/linux64/112.0.5615/chromedriver unexpectedly exited. Status code was: 127

@dimitryzub
Copy link
Owner

@Doloroy thank you for opening this issue 👍

Could you mention:

  • your Python version.
  • does organic results extraction worked before or it's the first time you ran it?
  • do you have Chrome browser installed (the one that you use for browsing)?

@dimitryzub dimitryzub added the help wanted Extra attention is needed label Apr 24, 2023
@Doloroy
Copy link
Author

Doloroy commented Apr 24, 2023

Thank you @dimitryzub

  • the python version is 3.10.6
  • the organic result extraction did not work, and it is my first time running it.
  • Chrome is installed as the default browser, and I have also updated it.

@dimitryzub
Copy link
Owner

dimitryzub commented Apr 25, 2023

@Doloroy thank you 👍

My assumption is that it is related to the Linux system. I've only tested and written this parser on Windows and haven't tested it on Linux.

I think that extra dependencies are required to run the chromedriver:

$ apt-get install -y libglib2.0-0 libnss3 libgconf-2-4 libfontconfig1

Ref:

Let me know if it helped, or didn't 👍

@dimitryzub dimitryzub changed the title Web-driver exits unexpectedly using CustomGoogleScholarOrganic() [Linux] Web-driver exits unexpectedly using CustomGoogleScholarOrganic() Apr 25, 2023
@Doloroy
Copy link
Author

Doloroy commented Apr 26, 2023

Thanks! Errors have been resolved.

@Doloroy Doloroy closed this as completed Apr 26, 2023
@dimitryzub
Copy link
Owner

dimitryzub commented Apr 26, 2023

@Doloroy Wonderful. Thank you for sharing this experience. I've updated README for Linux users 🙂

Let me know if you have any usability issues or something else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed ✅issue-resolved
Projects
None yet
Development

No branches or pull requests

2 participants