Last active
August 24, 2020 07:24
-
-
Save geektheripper/5605dafe02df239e0fbb4108db8b2fcc to your computer and use it in GitHub Desktop.
傻月月直播间定时发千纸鹤脚本
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
const token = document.cookie.match(/bili_jct=(.+?);/)[1]; | |
const uid = document.cookie.match(/DedeUserID=(.+?);/)[1]; | |
const sendQzh = async () => | |
await ( | |
await fetch("https://api.live.bilibili.com/gift/v2/Live/send", { | |
headers: { "content-type": "application/x-www-form-urlencoded" }, | |
referrer: "https://live.bilibili.com/4767523", | |
referrerPolicy: "no-referrer-when-downgrade", | |
body: `uid=${uid}&gift_id=30666&ruid=128912828&send_ruid=0&gift_num=1&coin_type=gold&bag_id=0&platform=pc&biz_code=live&biz_id=4767523&rnd=1598195851&storm_beat_id=0&metadata=&price=0&csrf_token=${token}&csrf=${token}&visit_id=`, | |
method: "POST", | |
mode: "cors", | |
credentials: "include", | |
}) | |
).text(); | |
setInterval(sendQzh, Number(prompt("请输入间隔时间(秒)", 30)) * 1000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
使用方式:
Console
或者控制台
选项卡