-
取消喜欢 / 收藏
let el = $("li.Eie04v01") do { const url_arr = el.querySelector("a.B3AsdZT9.chmb2GX8").href.split("/") const id = url_arr[url_arr.length - 1] let url = "取消连接地址" const params = { aweme_id: id, item_type: 0, type: 0 // 0:取消; 1:喜欢 } const formData = new FormData() for (let key in params) formData.set(key, params[key]) fetch(url, { method: 'post', body: formData }) el = el.nextElementSibling } while(el != null) setTimeout(() => window.location.reload(), 1000)
-
取消关注
$("div.AULCPX_8.LEaniV4W").click() const box = $("div.Pxf0E4cv") const container = $("div.Pxf0E4cv > div") const func = (interval) => setInterval(() => { if (container.childElementCount <= 30) { clearInterval(handler) handler = func(Math.floor(Math.random() * 5000)) box.scrollTop = box.scrollHeight } const div = container.querySelector("div.vcEWxPjN") if (div == null) return const btn = div.querySelector("button.bJi_3A3L") const btnTxt = btn.querySelector(".cNFB52sk") if (btnTxt.textContent != "相互关注") { btn.click() } div.nextElementSibling.remove() div.nextElementSibling.remove() div.remove() }, interval) let handler = func(Math.floor(Math.random() * 5000))