-
Notifications
You must be signed in to change notification settings - Fork 0
/
l_tv_schedule.js
33 lines (30 loc) · 1.07 KB
/
l_tv_schedule.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
电视剧播出表通知
cron 31 11 * * * l_tv_schedule.js
*/
/**
* Created by wxun on 2023/3/19 16:49.
* description: l_tv_schedule
*/
const { Env } = require("./utils/ql");
const $ = new Env("电视剧播出表通知");
const notify = $.isNode() ? require("./utils/sendNotify") : "";
const { Yysub } = require("./utils/yysub");
const { Subhd } = require("./utils/subhd");
const { Assrt } = require("./utils/assrt");
const {today} = require("./utils/utils");
!(async () => {
const yysub = new Yysub(),
subhd = new Subhd(),
assrt = new Assrt();
const subhdList = await subhd.gettTodaySchedule(),
assList = await assrt.gettTodaySchedule(),
yylist = (await yysub.gettTodaySchedule()).filter((s) =>
assList.filter((a) => a.includes(s.split(' ').shift())).length<1
),
list = [...yylist, ...subhdList, ...assList].map(e=>`✅ ${e}`);
if (list.length === 0) return;
const msgs = [`${today()} 共${list.length}部影视播出\n\n`, ...list];
console.log(msgs)
await notify.sendNotify("📺︎电视剧播出表通知", msgs.join("\n"));
})();