Skip to content

Instantly share code, notes, and snippets.

@limkokhole
Forked from kasuganosoras/fuckbaidu.js
Created January 14, 2021 16:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save limkokhole/79891b8caa1e8725427b3072d919d0d0 to your computer and use it in GitHub Desktop.
Save limkokhole/79891b8caa1e8725427b3072d919d0d0 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