#首页截图
f12查看网页源码,网页中的数据是动态加载出来的,所以用selenium框架进行进行操作。(可根据需求进行分页操作),在这里我只爬取了首页中的化妆品公司的详情信息。
这是要进行爬取的信息截图
from selenium import webdriver
from lxml import etree
import time
#导入类 实现让selenium规避被检测到的风险
from selenium.webdriver import ChromeOptions
#实现让selenium规避被检测到的风险
option=ChromeOptions()
option.add_experimental_option('excludeSwitches', ['enable-automation'])