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

add phantomjs requirement via node #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bnchdrff
Copy link
Collaborator

this way, we can use npm install to get phantomjs & user does not have to manually dl this requirement

this way, we can use `npm install` to get phantomjs & user does not have to manually dl this requirement
@jaycatsby
Copy link
Owner

Hey @bnchdrff ,
After installing phantomjs through npm install with the package.json in my project direct, I'm getting the following error when running the kresge-scraper.py:

FileNotFoundError: [WinError 2] The system cannot find the file specified

which references to files:
..\dledger\lib\site-packages\selenium\webdriver\common\service.py &
\Local\Programs\Python\Python36-32\lib\subprocess.py...

Also, I'm concurrently getting an exception with the error above:

File "scrapers/kresge-scraper.py", line 31, in init_driver
   driver = webdriver.PhantomJS(executable_path=PHANTOM_DRIVER)
File "C:\Users\Jay\Desktop\dledger\lib\site-packages\selenium\webdriver\phantomjs\webdriver.py", line 52, in __init__self.service.start()
File "C:\Users\Jay\Desktop\dledger\lib\site-packages\selenium\webdriver\common\service.py", line 81, in start os.path.basename(self.path), self.start_error_message)

selenium.common.exceptions.WebDriverException: Message: 'phantomjs' executable needs to be in PATH.

To resolve these issues, should I be setting the directory path to the phantomjs installed in node_modules/.bin or the lib\site-packages\selenium\etc.....? I've tried variations of both but not sure if I'm directing to the correct webdriver file...

OR would it be better for me to take on a similar approach to how @hampelm built the knight-scraper by setting up an index.js with python-shell...?

Thank you!

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

Successfully merging this pull request may close these issues.

2 participants