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

33 lines
663 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',
2023-01-10 09:20:22 +01:00
days: 2,
2022-06-16 14:07:56 +02:00
channels: 'example.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 [
{
2022-06-16 14:07:56 +02:00
title: 'Program1',
start: 1640995200000,
stop: 1640998800000
2022-01-19 15:00:39 +01: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
}