mirror of
https://github.com/iptv-org/epg
synced 2026-03-21 19:30:52 -04:00
Update /sites
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<site site="tvmi.mt">
|
||||
<channels>
|
||||
<channel lang="mt" xmltv_id="TVM.mt" site_id="2">TVM</channel>
|
||||
<channel lang="mt" xmltv_id="TVMnewsPlus.mt" site_id="3">TVMnews+</channel>
|
||||
<channel lang="mt" xmltv_id="TVMsportPlus.mt" site_id="4">TVMsport+</channel>
|
||||
</channels>
|
||||
</site>
|
||||
<channels>
|
||||
<channel site="tvmi.mt" lang="mt" xmltv_id="TVM.mt" site_id="2">TVM</channel>
|
||||
<channel site="tvmi.mt" lang="mt" xmltv_id="TVMnewsPlus.mt" site_id="3">TVMnews+</channel>
|
||||
<channel site="tvmi.mt" lang="mt" xmltv_id="TVMsportPlus.mt" site_id="4">TVMsport+</channel>
|
||||
</channels>
|
||||
|
||||
@@ -64,7 +64,7 @@ function parseStart($item, date) {
|
||||
)
|
||||
.text()
|
||||
.trim()
|
||||
const [_, HH, mm] = timeString.match(/^(\d{2}):(\d{2})/) || [null, null, null]
|
||||
const [, HH, mm] = timeString.match(/^(\d{2}):(\d{2})/) || [null, null, null]
|
||||
if (!HH || !mm) return null
|
||||
|
||||
return dayjs.tz(`${date.format('YYYY-MM-DD')} ${HH}:${mm}`, 'YYYY-MM-DD HH:mm', 'Europe/Malta')
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// npx epg-grabber --config=sites/tvmi.mt/tvmi.mt.config.js --channels=sites/tvmi.mt/tvmi.mt.channels.xml --output=guide.xml --days=2
|
||||
// npm run grab -- --site=tvmi.mt
|
||||
|
||||
const { parser, url } = require('./tvmi.mt.config.js')
|
||||
const fs = require('fs')
|
||||
@@ -46,7 +46,7 @@ it('can parse response', () => {
|
||||
|
||||
it('can handle empty guide', () => {
|
||||
const result = parser({
|
||||
content: `<!doctype html><html><head></head><body></body></html>`,
|
||||
content: '<!doctype html><html><head></head><body></body></html>',
|
||||
channel
|
||||
})
|
||||
expect(result).toMatchObject([])
|
||||
|
||||
Reference in New Issue
Block a user