-
Notifications
You must be signed in to change notification settings - Fork 360
Closed
Description
Hello I followed the installation guide, but I am having the next error. I am using python 3.7.0
yield SeleniumRequest(url, self.parse)
File "/usr/local/lib/python3.7/site-packages/scrapy_selenium/http.py", line 29, in __init__
super().__init__(*args, **kwargs)
TypeError: __init__() missing 1 required positional argument: 'url'
I added to the settings the next configuration
from shutil import which
SELENIUM_DRIVER_NAME='chrome'
SELENIUM_DRIVER_EXECUTABLE_PATH=which('geckodriver')
SELENIUM_DRIVER_ARGUMENTS=['-headless'] # '--headless' if using chrome instead of firefox
here is my code
def start_requests(self):
url = "http://egov.sos.state.or.us/br/pkg_web_name_srch_inq.do_name_srch?p_name=aa&p_regist_nbr=&p_srch=PHASE3P&p_print=FALSE&p_entity_status=ACTINA"
yield SeleniumRequest(url, self.parse)
def parse(self, response):
rows = response.selector.xpath("//table/tbody/tr")
One more tip, if I use the next way to implement selenium is working with no problem.
chromedriver = os.getcwd()+'/leadsScraper/chromedriver'
driver = webdriver.Chrome(chromedriver)
delay = 10
Metadata
Metadata
Assignees
Labels
No labels