add 订阅自动检查更新

This commit is contained in:
2023-07-22 15:56:26 +08:00
parent 573883e2d1
commit be48d26d8c
12 changed files with 193 additions and 45 deletions

View File

@@ -1,7 +1,7 @@
const puppeteer = require("puppeteer")
const { seep } = require("../utils.js");
async function getQqListData(url) {
const { seep, spawn } = require("../utils.js");
// 无头浏览器模式 暂时禁用
async function getQqListDataBack(url) {
const browser = await puppeteer.launch({
// 关闭无头模式,方便我们看到这个无头浏览器执行的过程
headless: false,
@@ -85,6 +85,24 @@ async function getQqListData(url) {
}
function getQqListData(cid){
return new Promise((resolve) => {
const lux = spawn("getTencentVideoPlayList", [cid, 'vversion_name=8.2.95;', 1])
lux.stdout.on('data', (data) => {
resolve(JSON.parse(String(data)))
});
lux.stderr.on("data",(a)=>{
console.log(a)
})
lux.stdout.on("error",(err)=>{
console.log(err)
})
lux.stderr.on("error",(err)=>{
console.log(err)
})
})
}
module.exports = {
getQqListData
}