• python爬虫 selenium标记信息修改


    一.浏览器内核太捞了一般人都会避开他

    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](,)
        },
       # 哪些信息就很明显咯
    
  • 相关阅读:
    Sensor Fusion-based Exploration in Home Environments using Information, Driving and Localization Gains(基于传感器融合的使用信息、驾驶和定位增益在家庭环境中的探索)
    Git中从远程的分支获取最新的版本到本地
    git拉取远程分支到本地分支或者创建本地新分支
    win7下使用git
    ADAS

    struct对齐
    STL容器
    智能指针
    c++中的基本知识点
  • 原文地址:https://www.cnblogs.com/pythonywy/p/13039280.html
Copyright © 2020-2023  润新知