Scrapy docking Selenium

First pip install selenium, and then download the browser Driver

 

WebDrive Download

chrome的webdriver:http://chromedriver.storage.googleapis.com/index.html

Firefox Firefox driver download address is: https: //github.com/mozilla/geckodriver/releases/

The operating system and browser version, to download the appropriate driver, and set the path to the downloaded environment variable webdriver

 

 

 Unzip the downloaded zip out directly inside the exe file into the directory of the operating environment can be

 

 

 

Simple to use

Operate middleware, do not call the downloader, returned directly a response object

Import package: from selenium import webdriver

 

 

 

Windowless mode

Then into a package: from selenium.webdriver.chrome.options import Options

 

 

 

Guess you like

Origin www.cnblogs.com/jiyu-hlzy/p/11850406.html