I'm using scrapy to crawl all the links and selenium to scrape all the pages. Selenium scraped most of the pages but left a few pages as the page took time to load.
I tried with timeout() , but didn't seem to work, then I tried with execute_script
driver.execute_script("return document.readyState=="complete";")
this also didn't seem to work, then I tried with expected_conditions
WebDriverWait.until(expected_conditions.execute_script("return document.readyState=="complete";"))
but didn't seem to work
I m using firefox browser, phantomJs for Headless
Tried using Chrome driver so installed using brew cask install chromedriver
but I'm facing this error
raise WebDriverException("Can not connect to the Service %s" % self.path) selenium.common.exceptions.WebDriverException: Message: Can not connect to the Service chromedriver
so back to phantomjs.
Thank you!