Created
November 25, 2017 04:48
-
-
Save z11i/2daf934c60d1c4088a07c4df7779f10d to your computer and use it in GitHub Desktop.
批量取关知乎关注问题。去 https://www.zhihu.com/question/following 页面执行脚本。会取消所有关注的问题。
This file contains hidden or 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 unfollow() { | |
window.scrollTo(0, document.body.scrollHeight); | |
setTimeout(function() { | |
console.log('unfollowed'); | |
let list = document.querySelectorAll('.follow-link.zg-unfollow.meta-item'); | |
list[0].click(); | |
unfollow() | |
}, 1000) | |
} | |
unfollow() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
这一页被清空了https://www.zhihu.com/question/following
没办法只好自己用puppeteer写一个 https://gist.github.com/katxz/748717f87fe495346d40f7f3fdca5794