网上看到一个自动批量删除微博的js脚本,经测试可用:
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() { var times = 0; 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 times ++; if(times < 6) { $(\'html, body\').animate({ scrollTop: $(document).height() }, \'slow\'); } var len = $(\'div[action-type="feed_list_item"]\').length; console.log(len) if (len < 5) { times = 0; $(\'a[class="page next S_txt1 S_line1"]\')[0].click(); } }, 1000); }; document.head.appendChild(s);
打开我的微博页面,将脚本复制到浏览器控制台执行即可,可以自动翻页,但是由于微博有访问频率限制,只能一个一个慢慢删。
添加了下拉次数限制,减少页面报错。