一.瀏覽器內核太撈了一般人都會避開他 from selenium.webdriver import Chrome from selenium.webdriver import ChromeOptions option = ChromeOptions() option.add_experimental ...
一.瀏覽器內核太撈了一般人都會避開他
from selenium.webdriver import Chrome
from selenium.webdriver import ChromeOptions
option = ChromeOptions()
option.add_experimental_option('excludeSwitches', ['enable-automation'])
driver = Chrome(options=option)
二.避開標記信息
webdriver
__driver_evaluate
__webdriver_evaluate
__selenium_evaluate
__fxdriver_evaluate
__driver_unwrapped
__webdriver_unwrapped
__selenium_unwrapped
__fxdriver_unwrapped
_Selenium_IDE_Recorder
_selenium
calledSelenium
_WEBDRIVER_ELEM_CACHE
ChromeDriverw
driver-evaluate
webdriver-evaluate
selenium-evaluate
webdriverCommand
webdriver-evaluate-response
__webdriverFunc
__webdriver_script_fn
__$webdriverAsyncExecutor
__lastWatirAlert
__lastWatirConfirm
__lastWatirPrompt
$chrome_asyncScriptInfo
$cdc_asdjflasutopfhvcZLmcfl_
#mitmproxy攔截識別的js
#思路二直接改驅動文件用010編輯器打開驅動,拿$cdc舉例,搜索到$cdc然後後面欄位用等長的隨機字母數字進行一一替換
拿AKAMAI識別瀏覽器js為例
sed: function() {
var a;
a = window[$cdc_asdjflasutopfhvcZLmcfl_] || document[$cdc_asdjflasutopfhvcZLmcfl_] ? 1 : 0;
var t;
t = null != window[document][documentElement][getAttribute](webdriver) ? 1 : 0;
var e;
e = void 0 !== navigator[webdriver] && navigator[webdriver] ? 1 : 0;
var n;
n = void 0 !== window[webdriver] ? 1 : 0;
var o;
o = void 0 !== window[XPathResult] || void 0 !== document[XPathResult] ? 1 : 0;
var m;
m = null != window[document][documentElement][getAttribute](driver) ? 1 : 0;
var r;
return r = null != window[document][documentElement][getAttribute](selenium) ? 1 : 0,
[a, t, e, n, o, m, r][join](,)
},
# 哪些信息就很明顯咯