selenium防止检测,修改chromedriver.exe

用文本编辑器打开chromedriver.exe,搜索$cdc_asdjflasutopfhvcZLmcfl_这个字符串,随便改几个字母,保持相同长度就行

/**
 * Returns the global object cache for the page.
 * @param {Document=} opt_doc The document whose cache to retrieve. Defaults to
 *     the current document.
 * @return {!Cache} The page's object cache.
 */
function getPageCache(opt_doc, opt_w3c) {
  var doc = opt_doc || document;
  var w3c = opt_w3c || false;
  // |key| is a long random string, unlikely to conflict with anything else.
  var key = '$cdc_asdjflasutopfhvcZLmcfl_';
  if (w3c) {
    if (!(key in doc))
      doc[key] = new CacheWithUUID();
    return doc[key];
  } else {
    if (!(key in doc))
      doc[key] = new Cache();
    return doc[key];
  }
}

 

posted @ 2022-01-26 21:07  锐洋智能  阅读(512)  评论(0)    收藏  举报