批量删除微博(转载)

匿名 (未验证) 提交于 2019-12-02 23:49:02

作者:Vayn

链接:https://www.zhihu.com/question/23442423/answer/549864289
来源:知乎
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。


进入微博我的主页,鼠标右击Chrome的检查,在Console中粘贴如下代码
var s = document.createElement('script'); s.setAttribute(   'src',   'https://lib.sinaapp.com/js/jquery/2.0.3/jquery-2.0.3.min.js' ); s.onload = function() {   setInterval(function() {     if (!$('a[action-type="feed_list_delete"]')) {       $('a.next').click();     } else {       $('a[action-type="feed_list_delete"]')[0].click();       $('a[action-type="ok"]')[0].click();     }      // scroll bottom let auto load     $('html, body').animate({ scrollTop: $(document).height() }, 'slow');     var len = $('div[action-type="feed_list_item"]').length;     if (len < 5) { $('a[class="page next S_txt1 S_line1"]')[0].click(); }   }, 800); }; document.head.appendChild(s);

以及删除粉丝:

var s = document.createElement('script'); s.setAttribute(   'src',   'https://lib.sinaapp.com/js/jquery/2.0.3/jquery-2.0.3.min.js' ); s.onload = function() {   setInterval(function() {     if (!$('a[action-type="removeFan"]')) {       $('a.next').click();     } else {       $('a[action-type="removeFan"]')[0].click();        setTimeout(function (){}, 50);       $('a[action-type="ok"]')[0].click();     }      var len = $('li.follow_item').length;     if (len < 2) {         $('a[class="page next S_txt1 S_line1"]')[0].click();     }   }, 1500); }; document.head.appendChild(s);
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!