mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
[fix] fixing skyperfectv.co.jp
This commit is contained in:
parent
276414bc63
commit
aa77d8abe6
3 changed files with 14 additions and 13 deletions
|
@ -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 = [
|
||||
|
@ -110,4 +109,6 @@ module.exports = {
|
|||
|
||||
return await fetchAllChannels()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = exported
|
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue