selenium + chrome
很多難以采集的網站都使用selenium爬取,但是后來發現selenium
有特征值,會被檢測出來,今天來小結一下反反爬方案
測試網站 全綠好像代表沒被檢測出
中間人修改js
網上很多都是這種博客,不知道靠不靠譜
pyppeteer
這種python的異步請求庫,似乎極好的解決了
簡書博客
開發者模式
似乎使用開發者模式可以避免被檢測,還需要測試,拼夕夕貌似給繞過去了hhh
[python+selenium代碼]
options = webdriver.ChromeOptions()
options.add_experimental_option('excludeSwitches', ['enable-automation'])
driver = webdriver.Chrome(options=option)