GitHub节目单日期问题

This commit is contained in:
develop202
2026-01-16 07:45:56 +08:00
parent 8a73d0de64
commit 2ab259b494
3 changed files with 6 additions and 6 deletions

View File

@@ -3,7 +3,8 @@
账号🐔了。~~只有标清..~~ 高清为主😅 gitee仓库被改私有了..
~~gitee ip被ban仓库链接已失效~~
仓库地址临时复活能活多久看运气目前存在频道缺失或无法播放的问题回放功能仅migu源生效还在测试。
仓库地址临时复活能活多久看运气存在频道缺失或无法播放的问题回放功能仅migu源生效还在测试。
访问地址(可回看当天内容)

View File

@@ -12,7 +12,6 @@ printMagenta("开始更新...")
const datas = await dataList()
printGreen("数据获取成功!")
try {
const playbackFile = `${process.cwd()}/playback.xml.bak`

View File

@@ -4,8 +4,8 @@ import { cntvNames } from "./datas.js"
import { fetchUrl } from "./net.js"
async function getPlaybackData(programId, timeout = 6000) {
const date = new Date()
async function getPlaybackData(programId, timeout = 6000, githubAnd8) {
const date = new Date(Date.now() + githubAnd8)
const today = getDateString(date)
const resp = await fetchUrl(`https://program-sc.miguvideo.com/live/v2/tv-programs-data/${programId}/${today}`, {}, timeout)
return resp.body?.program[0]?.content
@@ -13,7 +13,7 @@ async function getPlaybackData(programId, timeout = 6000) {
async function updatePlaybackDataByMigu(program, filePath, timeout = 6000, githubAnd8 = 0) {
// 今日节目数据
const playbackData = await getPlaybackData(program.pID, timeout)
const playbackData = await getPlaybackData(program.pID, timeout, githubAnd8)
if (!playbackData) {
return false
}
@@ -40,7 +40,7 @@ async function updatePlaybackDataByMigu(program, filePath, timeout = 6000, githu
async function updatePlaybackDataByCntv(program, filePath, timeout = 6000, githubAnd8 = 0) {
// 今日节目数据
const date = new Date()
const date = new Date(Date.now() + githubAnd8)
const today = getDateString(date)
const cntvName = cntvNames[program.name]
const resp = await fetchUrl(`https://api.cntv.cn/epg/epginfo3?serviceId=shiyi&d=${today}&c=${cntvName}`, {}, timeout)