Last active
December 22, 2015 06:58
-
-
Save snow/6434337 to your computer and use it in GitHub Desktop.
以小组管理员身份批量删除指定用户的帖子的注入脚本,用于粘贴进console执行
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
var CK = $('a[href^=http://www.douban.com/accounts/logout]').attr('href').match(/ck=\w+/)[0].substr(3), | |
USER = 'SOME_FUCKER'; // http://www.douban.com/people/SOME_FUCKER/ | |
$('#group-topics tr:has(td a[href=http://www.douban.com/people/'+user+'/])').each(function(idx, el){ | |
var jTr = $(el), | |
topicId = jTr.find('[href^=http://www.douban.com/group/topic/]').attr('href').match(/\d+/)[0]; | |
$.post("http://www.douban.com/group/topic/"+topicId+"/admin_remove?ck="+CK, { | |
reason: 4 | |
}, function(result){ console.log('#'+topicId+' delete request for posted') }); | |
}); | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment