Skip to content

Commit aa77d8a

Browse files
committed
[fix] fixing skyperfectv.co.jp
1 parent 276414b commit aa77d8a

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

sites/s.mxtv.jp/s.mxtv.jp.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ module.exports = {
1717
const id = `SV${channel.site_id}EPG${date.format('YYYYMMDD')}`
1818
return `https://s.mxtv.jp/bangumi_file/json01/${id}.json`
1919
},
20-
parser: function ({ content, channel, date }) {
20+
parser: function ({ content }) {
2121
let programs = []
22-
const items = parseItems(content, channel, date)
22+
const items = parseItems(content)
2323
items.forEach(item => {
2424
programs.push({
2525
title: item.Event_name,
@@ -32,7 +32,7 @@ module.exports = {
3232
})
3333
return programs
3434
},
35-
async channels() {
35+
channels() {
3636
return [
3737
{
3838
lang: 'ja',

sites/skyperfectv.co.jp/skyperfectv.co.jp.config.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dayjs.extend(timezone)
1111
dayjs.extend(customParseFormat)
1212
dayjs.extend(duration)
1313

14-
module.exports = {
14+
const exported = {
1515
site: 'skyperfectv.co.jp',
1616
days: 1,
1717
lang: 'ja',
@@ -25,17 +25,16 @@ module.exports = {
2525
},
2626
// Specific function that permits to gather NSFW channels (needs confirmation)
2727
async fetchSchedule({ date, channel }) {
28-
const url = this.url({ date, channel })
28+
const url = exported.url({ date, channel })
2929
const response = await axios.get(url, {
3030
headers: {
3131
'Cookie': 'adult_auth=true'
3232
}
3333
})
3434
return response.data
3535
},
36-
async parser({ date, channel }) {
37-
const sched = await this.fetchSchedule({ date, channel })
38-
const $ = cheerio.load(sched)
36+
parser({ content, date }) {
37+
const $ = cheerio.load(content)
3938
const programs = []
4039

4140
const sections = [
@@ -110,4 +109,6 @@ module.exports = {
110109

111110
return await fetchAllChannels()
112111
}
113-
}
112+
}
113+
114+
module.exports = exported

0 commit comments

Comments
 (0)