Update /sites

This commit is contained in:
freearhey 2023-10-02 06:35:33 +03:00
parent ca254a6df0
commit c0cfcf7a47
543 changed files with 30781 additions and 31187 deletions

File diff suppressed because it is too large Load diff

View file

@ -13,7 +13,7 @@ module.exports = {
parser: function ({ buffer, date }) {
const programs = []
const items = parseItems(buffer)
items.forEach((item, i) => {
items.forEach(item => {
const prev = programs[programs.length - 1]
const $item = cheerio.load(item)
let start = parseStart($item, date)

View file

@ -1,4 +1,4 @@
// npx epg-grabber --config=sites/m.tv.sms.cz/m.tv.sms.cz.config.js --channels=sites/m.tv.sms.cz/m.tv.sms.cz.channels.xml --output=guide.xml
// npm run grab -- --site=m.tv.sms.cz
const { parser, url } = require('./m.tv.sms.cz.config.js')
const iconv = require('iconv-lite')
@ -34,14 +34,14 @@ it('can parse response', () => {
expect(results[0]).toMatchObject({
start: '2023-06-11T03:21:00.000Z',
stop: '2023-06-11T04:08:00.000Z',
title: `Conspiraciones al descubierto: La bomba atómica alemana y el hundimiento del Titanic`,
title: 'Conspiraciones al descubierto: La bomba atómica alemana y el hundimiento del Titanic',
description: 'Documentales'
})
expect(results[25]).toMatchObject({
start: '2023-06-12T02:23:00.000Z',
stop: '2023-06-12T03:23:00.000Z',
title: `Rapa I (6)`,
title: 'Rapa I (6)',
description: 'Series'
})
})
@ -50,7 +50,7 @@ it('can handle empty guide', () => {
const result = parser({
buffer: iconv.encode(
Buffer.from(
`<!DOCTYPE html><html><head></head><body><textarea data-jtrt-table-id="508" id="jtrt_table_settings_508" cols="30" rows="10"></textarea></body></html>`
'<!DOCTYPE html><html><head></head><body><textarea data-jtrt-table-id="508" id="jtrt_table_settings_508" cols="30" rows="10"></textarea></body></html>'
),
'win1250'
)