epg-grabber/tests/input/example.com.config.js

38 lines
881 B
JavaScript
Raw Normal View History

2022-01-19 15:00:39 +01:00
const dayjs = require('dayjs')
const utc = require('dayjs/plugin/utc')
dayjs.extend(utc)
2021-03-19 20:17:07 +01:00
module.exports = {
site: 'example.com',
channels: 'example.com.channels.xml',
2021-09-15 10:20:00 +02:00
output: 'tests/output/guide.xml',
2021-03-19 20:17:07 +01:00
url: () => 'http://example.com/20210319/1tv.json',
request: {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Cookie: 'abc=123'
},
data() {
return { accountID: '123' }
}
},
2022-01-19 15:00:39 +01:00
parser: () => {
return [
{
title: 'Title',
description: 'Description',
lang: 'en',
category: ['Category1', 'Category2'],
icon: 'https://example.com/image.jpg',
season: 9,
episode: 238,
start: dayjs.utc('2022-01-01 00:00:00'),
stop: dayjs.utc('2022-01-01 01:00:00')
}
]
},
2021-04-26 14:47:07 +02:00
logo: () => 'http://example.com/logos/1TV.png?x=шеллы&sid=777'
2021-03-19 20:17:07 +01:00
}