Husnain Ahmad
Husnain Ahmad

Reputation: 35

How to use chrome driver with head in Scrapy Selenium

I Am using Scrapy with scrapySelenium but the scrapy selenium starts with a headless browser but for some purpose i need to start it with head so i can keep seeing what my scrapy does in the browser how to turn off headless arguments passed in settings of scrapy

this is what i copied in the settings it is headless as you can see but want to see the browser open up with Scrapy Selenium is there anyway from shutil import which

SELENIUM_DRIVER_NAME = 'chrome' SELENIUM_DRIVER_EXECUTABLE_PATH = which('chromedriver') SELENIUM_DRIVER_ARGUMENTS=['-headles'] # '--headless' if using chrome instead of firefox

Upvotes: 1

Views: 2709

Answers (1)

AaronS
AaronS

Reputation: 2335

Delete the SELENIUM_DRIVER_ARGUMENTS = ['--headless'] from the settings.py.

With selenium webdriver you can pass arguments and this argument makes sure that it is a headless browser.

Upvotes: 2

Related Questions