mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-09 16:40:07 -04:00
Update /sites
This commit is contained in:
parent
ca254a6df0
commit
c0cfcf7a47
543 changed files with 30781 additions and 31187 deletions
File diff suppressed because it is too large
Load diff
|
@ -14,7 +14,6 @@ module.exports = {
|
|||
days: 2,
|
||||
url: API_ENDPOINT,
|
||||
request: {
|
||||
timeout: 30000, // 30 seconds
|
||||
method: 'POST',
|
||||
headers({ channel }) {
|
||||
return {
|
||||
|
@ -103,7 +102,7 @@ function parseDescription($item) {
|
|||
|
||||
function parseStart($item, date) {
|
||||
let eventDataDate = $item('.event-data-date').text().trim()
|
||||
let [_, time] = eventDataDate.match(/(\d{2}:\d{2})/) || [null, null]
|
||||
let [, time] = eventDataDate.match(/(\d{2}:\d{2})/) || [null, null]
|
||||
if (!time) return null
|
||||
|
||||
return dayjs.utc(`${date.format('YYYY-MM-DD')} ${time}`, 'YYYY-MM-DD HH:mm')
|
||||
|
@ -111,7 +110,7 @@ function parseStart($item, date) {
|
|||
|
||||
function parseDuration($item) {
|
||||
let eventDataInfo = $item('.event-data-info').text().trim()
|
||||
let [_, h, m] = eventDataInfo.match(/(\d{2})h(\d{2})/) || [null, 0, 0]
|
||||
let [, h, m] = eventDataInfo.match(/(\d{2})h(\d{2})/) || [null, 0, 0]
|
||||
|
||||
return parseInt(h) * 60 + parseInt(m)
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// npm run channels:parse -- --config=sites/sat.tv/sat.tv.config.js --output=sites/sat.tv/sat.tv.channels.xml --set=lang:ar --set=satSatellite:1 --set=satLineup:38
|
||||
// npx epg-grabber --config=sites/sat.tv/sat.tv.config.js --channels=sites/sat.tv/sat.tv.channels.xml --output=guide.xml
|
||||
// npm run grab -- --site=sat.tv
|
||||
|
||||
const { parser, url, request } = require('./sat.tv.config.js')
|
||||
const fs = require('fs')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue