leoncvlt / blinkist-scraper

📚 Python tool to download book summaries and audio from Blinkist.com, and generate some pretty output
190 stars 36 forks source link

Running Into Chromedriver install error #26

Closed jakethesnakeroberts closed 4 years ago

jakethesnakeroberts commented 4 years ago

Chromedriver is being installed earlier in proc from the autoinstaller dir then runs into another "missing" error when options.py is running. Unsure how to resolve.

Help is appreciated. Sorry if this is the wrong place to comment. This is my first time so any feedback is helpful.

$ python main.py --language en --categories market  --create-html --save-cover -v @@@@@ XXXXX
[15:45:32] INFO Starting scrape run...
[15:45:32] INFO Initialising chromedriver at C:\Python38\lib\site-packages\chromedriver_autoinstaller\84\chromedriver.exe...
Traceback (most recent call last):
  File "main.py", line 340, in <module>
    main()
  File "main.py", line 276, in main
    driver = scraper.initialize_driver(
  File "C:\Users\USER\Documents\GitHub\blinkist-scraper\blinkistscraper\scraper.py", line 67, in initialize_driver
    chrome_options.add_extension(
  File "C:\Python38\lib\site-packages\selenium\webdriver\chrome\options.py", line 131, in add_extension
    raise IOError("Path to the extension doesn't exist")
OSError: Path to the extension doesn't exist
leoncvlt commented 4 years ago

The issue is about the program not being able to able find the pre-packaged ublock extension - reason it's not finding it is because you are calling the script from inside the blinkistscraper folder - you need to be outside it (at the same level where .gitignore and readme.md) are and call the script like this: python loconotion --language en --categories market ..."

The __main__.py file is not meant to be called directly, its purpose is to make the entire blinkistscraper folder executable: https://stackoverflow.com/questions/4042905/what-is-main-py

EDIT: Just realized the the readme file still referred to main.py in the instructions, which was for an older version of the script - I updated it, which should hopefully cause less confusion now 🙂

jakethesnakeroberts commented 4 years ago

I saw that README update! Thanks for idiot-proofing the instructions.

Sincerely, An Idiot 😅

~Got it to work until it didn't. I got a "Too many requests" error from blinkist blocking me from accessing the site for a little while. Have you ran into that? Does this not work on Trial memberships? Cheers.~

I think the issue is on my end. ChromeDriver says no network even though I'm connected. Mark the issue as resolved because it is and I'll keep troubleshooting the other stuff.