mirror of
https://github.com/iptv-org/epg
synced 2025-12-16 18:37:01 -05:00
[fix] fixing skyperfectv.co.jp
This commit is contained in:
@@ -17,9 +17,9 @@ module.exports = {
|
||||
const id = `SV${channel.site_id}EPG${date.format('YYYYMMDD')}`
|
||||
return `https://s.mxtv.jp/bangumi_file/json01/${id}.json`
|
||||
},
|
||||
parser: function ({ content, channel, date }) {
|
||||
parser: function ({ content }) {
|
||||
let programs = []
|
||||
const items = parseItems(content, channel, date)
|
||||
const items = parseItems(content)
|
||||
items.forEach(item => {
|
||||
programs.push({
|
||||
title: item.Event_name,
|
||||
@@ -32,7 +32,7 @@ module.exports = {
|
||||
})
|
||||
return programs
|
||||
},
|
||||
async channels() {
|
||||
channels() {
|
||||
return [
|
||||
{
|
||||
lang: 'ja',
|
||||
|
||||
@@ -11,7 +11,7 @@ dayjs.extend(timezone)
|
||||
dayjs.extend(customParseFormat)
|
||||
dayjs.extend(duration)
|
||||
|
||||
module.exports = {
|
||||
const exported = {
|
||||
site: 'skyperfectv.co.jp',
|
||||
days: 1,
|
||||
lang: 'ja',
|
||||
@@ -25,7 +25,7 @@ module.exports = {
|
||||
},
|
||||
// Specific function that permits to gather NSFW channels (needs confirmation)
|
||||
async fetchSchedule({ date, channel }) {
|
||||
const url = this.url({ date, channel })
|
||||
const url = exported.url({ date, channel })
|
||||
const response = await axios.get(url, {
|
||||
headers: {
|
||||
'Cookie': 'adult_auth=true'
|
||||
@@ -33,9 +33,8 @@ module.exports = {
|
||||
})
|
||||
return response.data
|
||||
},
|
||||
async parser({ date, channel }) {
|
||||
const sched = await this.fetchSchedule({ date, channel })
|
||||
const $ = cheerio.load(sched)
|
||||
parser({ content, date }) {
|
||||
const $ = cheerio.load(content)
|
||||
const programs = []
|
||||
|
||||
const sections = [
|
||||
@@ -111,3 +110,5 @@ module.exports = {
|
||||
return await fetchAllChannels()
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = exported
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user