Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
去掉百度的反爬虫内容
// ==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