feat: 自动发动态可选; fix: 补充发送通知缺少的content-type字段

This commit is contained in:
shanmite 2021-03-14 18:47:52 +08:00
parent 500e3bcbef
commit 131e381a90
5 changed files with 19 additions and 6 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
node_modules/
lib/GlobalVar.json
lib/dyid.txt
dyid.zip
env.bat

View File

@ -124,9 +124,12 @@ Chrome浏览器:
### 检测中奖
每两个小时检测一次
通过`@`信息判断
通过私信判断
*关键词有限 可能会有漏掉的或误报*
> 脚本只会推送两小时内的中奖通知
- 通过`@`信息判断
- 通过私信判断
*关键词有限 可能会有**漏掉**的或**误报***
#### 手动检查
手动触发`Automatic check`工作流后可在日志中查看
@ -339,6 +342,10 @@ lottery_*:
- up主粉丝数限制
- 仅限制没有官方认证的up
- 字符串类型
- `create_dy`
- 是否发送随机动态(防止被开奖机过滤)
- `'1'`开启
- `'0'`关闭
- `blacklist`
- 防钓鱼uid黑名单
- 逗号分割字符串

View File

@ -9,6 +9,7 @@ const default_config = {
maxday: '-1',
wait: '180000',
minfollower: '1000',
create_dy: '1',
/* 与最新黑名单同步 */
blacklist: '28008897,28272016,140389827,24598781,28008860,28008880,28008743,28008948,28009292,319696958,90138218,28272000,28272047,28271978,8831288,175979009,3177443,486780865,403048135,474325039,455274996,477519424,292671666,448873224,22498938,1770865,444796995,306112375,320193786,606637517,305276429,204487541,404761800,186914127,99439379,457697569,270886929,477519424,401575,201296348,206804212,333584926,34679178,699923691,392689522,178700744,272882445,350977368,487168411,22682842,444949061,523974463,192231907,503908324,383189098,252909207,336467750,264875137,90721742,452299642,677739290,441522918,8766623,698327474,5439672,483247863,237055308,95404163,202052696,1309889741,627942060,455030741,406353670,18036870,470220612',
blockword: ["脚本抽奖", "恭喜", "结果", "抽奖号"],

View File

@ -35,7 +35,9 @@ function start() {
console.log('所有动态转发完毕');
console.log('[运行结束]目前无抽奖信息,过一会儿再来看看吧');
times.clear();
createRandomDynamic()
if (GlobalVar.create_dy === '1') {
createRandomDynamic()
}
resolve()
return
}

View File

@ -133,9 +133,9 @@ function serverNotify(text, desp) {
return new Promise(resolve => {
if (SCKEY) {
HttpRequest({
method: 'POST',
method: 'GET',
url: `https://sc.ftqq.com/${SCKEY}.send`,
contents: {
query: {
text,
desp
},
@ -293,6 +293,7 @@ function tgBotNotify(text, desp) {
},
headers: {
accept: 'application/json, text/plain, */*',
'content-type': 'application/json'
},
success: res => {
try {
@ -494,6 +495,7 @@ function iGotNotify(text, desp, params = {}) {
},
headers: {
accept: 'application/json, text/plain, */*',
'content-type': 'application/json'
},
success: res => {
try {