私はPythonのファイルにセレンモジュールをインポートしたが、私はこのコードを実行するとき、私は私がしなければならない何python webscrapingでこのエラーを解決するには?
Traceback (most recent call last):
File "koovs.py", line 4, in <module>
browser=webdriver.Firefox()
File "C:\Users\hp\Anaconda2\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 140, in __init__
self.service.start()
File "C:\Users\hp\Anaconda2\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: 'geckodriver' executable needs to be in PATH.
Exception AttributeError: "'Service' object has no attribute 'process'" in <bound method Service.__del__ of
<selenium.webdriver.firefox.service.Service object at 0x0000000003228400>> ignored
を得ました。私のコードは
from selenium import webdriver
from bs4 import BeautifulSoup
browser=webdriver.Firefox()
browser.get('http://www.koovs.com/women/dresses/sortby-discount-high/')
soup=BeautifulSoup(browser.page_source)
エラーを画像の代わりにテキストとして貼り付ける必要があります。 –
あなたの質問には、エラー画像が正しくないと思います。 – yumere
お使いのOSやVMのセットアップを確認できますか? Firefoxがインストールされ、実行ファイルがあなたのPATHにありますか?私はあなたがWindows上にいると仮定します。たぶんこの答えをチェックしてくださいhttp://stackoverflow.com/a/17582010/823942あなたが正しい道を導くかどうかを確認する。 –