Skip to content

Instantly share code, notes, and snippets.

@kasuganosoras
Created June 22, 2020 14:56
Show Gist options
  • Save kasuganosoras/86be4f231426580874798a6ba2e30b77 to your computer and use it in GitHub Desktop.
Save kasuganosoras/86be4f231426580874798a6ba2e30b77 to your computer and use it in GitHub Desktop.
去掉百度的反爬虫内容
// ==UserScript==
// @name Fuck Baidu Zhidao
// @namespace http://www.baidu.com/
// @version 0.1
// @description try to fuck over the baidu!
// @author Baidu
// @match https://zhidao.baidu.com/question/*.html
// @grant none
// ==/UserScript==
(function() {
'use strict';
var answer_list = document.querySelectorAll('.answer-text');
for(var i = 0;i < answer_list.length;i++) {
var list = answer_list[i].querySelectorAll('span');
for(var k = 0;k < list.length;k++) {
if(list[k].offsetHeight <= 1) {
list[k].remove();
}
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment