diff --git a/sites/s.mxtv.jp/s.mxtv.jp.config.js b/sites/s.mxtv.jp/s.mxtv.jp.config.js
index 3cc08ef2..e676d826 100644
--- a/sites/s.mxtv.jp/s.mxtv.jp.config.js
+++ b/sites/s.mxtv.jp/s.mxtv.jp.config.js
@@ -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',
diff --git a/sites/skyperfectv.co.jp/skyperfectv.co.jp.config.js b/sites/skyperfectv.co.jp/skyperfectv.co.jp.config.js
index 08f4e85c..c2d4aa23 100644
--- a/sites/skyperfectv.co.jp/skyperfectv.co.jp.config.js
+++ b/sites/skyperfectv.co.jp/skyperfectv.co.jp.config.js
@@ -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()
}
-}
\ No newline at end of file
+}
+
+module.exports = exported
\ No newline at end of file
diff --git a/sites/skyperfectv.co.jp/skyperfectv.co.jp.test.js b/sites/skyperfectv.co.jp/skyperfectv.co.jp.test.js
index c6ff247c..eae08e3f 100644
--- a/sites/skyperfectv.co.jp/skyperfectv.co.jp.test.js
+++ b/sites/skyperfectv.co.jp/skyperfectv.co.jp.test.js
@@ -21,14 +21,14 @@ it('can generate valid url', () => {
expect(result).toBe('https://www.skyperfectv.co.jp/program/schedule/basic/channel:BS193/date:240801')
})
-it('can parse response', () => {
- const result = parser({ date, channel, content }).map(p => {
+it('can parse response', async () => {
+ const result = (await parser({ date, channel, content })).map(p => {
p.start = p.start.toJSON()
p.stop = p.stop.toJSON()
return p
})
- expect(result).toMatchObject([
+ expect(result.filter(p => p.title == 'ヴァルキリードライヴマーメイド #06')).toMatchObject([
{
start: '2024-07-31T19:00:00.000Z', // UTC time
stop: '2024-07-31T19:30:00.000Z', // UTC
@@ -43,7 +43,7 @@ const empty = `
番組表(アニメシアターX(AT-X))|スカパー!
現在マイリストを更新中です。

現在マイリストに登録中です。

現在マイリストから削除中です。
・このサイトでは、当日から1週間分はEPGと同等の番組情報が表示され、その先1ヶ月後まではガイド誌(有料)と同等の番組情報が表示されます。番組や放送予定は予告なく変更される場合がありますのでご了承ください。
・このサイトは、ウェブブラウザーMicrosoftEdge最新版、GoogleChrome最新版、Firefox最新版、Safari最新版での動作を確認しております。上記以外のウェブブラウザーで閲覧されますと、表示の乱れや予期せぬ動作を起こす場合がございますので、予めご了承ください。
©橋本悠/集英社・リリサ製作委員会/©鍋敷/アース・スターエンターテイメント/俺は全てを【パリイ】する製作委員会/©AT-X ©天原・masha/株式会社KADOKAWA/異種族レビュアーズ製作委員会/©THEMARGINALSERVICE PROJECT/©荒巻義雄・徳間書店/©2015上栖綴人・Nitroplus/KADOKAWA/「新妹魔王の契約者BURST」製作委員会/©中村力斗・野澤ゆき子/集英社・君のことが大大大大大好きな製作委員会/©2018上栖綴人・Nitroplus/KADOKAWA/「新妹魔王の契約者DEPARTURES」製作委員会/© 小林尽/講談社・マーベラス・キングレコード・創通
- ログインをしてお気に入り番組を登録しよう!
- Myスカパー!にログインをすると、マイリストにお気に入り番組リストを作成することができます!
- マイリストに番組を登録できません
- ##ERROR_MSG##

`
-it('can handle empty guide', () => {
+it('can handle empty guide', async () => {
const result = parser({
date,
channel,