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
|
@ -1,13 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<site site="rthk.hk">
|
||||
<channels>
|
||||
<channel lang="en" xmltv_id="RTHKTV31.hk" site_id="31">TV 31</channel>
|
||||
<channel lang="en" xmltv_id="RTHKTV32.hk" site_id="32">TV 32</channel>
|
||||
<channel lang="en" xmltv_id="RTHKTV33.hk" site_id="33">TV 33</channel>
|
||||
<channel lang="en" xmltv_id="RTHKTV34.hk" site_id="34">TV 34</channel>
|
||||
<channel lang="zh" xmltv_id="RTHKTV31.hk" site_id="31">TV 31</channel>
|
||||
<channel lang="zh" xmltv_id="RTHKTV32.hk" site_id="32">TV 32</channel>
|
||||
<channel lang="zh" xmltv_id="RTHKTV33.hk" site_id="33">TV 33</channel>
|
||||
<channel lang="zh" xmltv_id="RTHKTV34.hk" site_id="34">TV 34</channel>
|
||||
</channels>
|
||||
</site>
|
||||
<channels>
|
||||
<channel site="rthk.hk" lang="en" xmltv_id="RTHKTV31.hk" site_id="31">TV 31</channel>
|
||||
<channel site="rthk.hk" lang="en" xmltv_id="RTHKTV32.hk" site_id="32">TV 32</channel>
|
||||
<channel site="rthk.hk" lang="en" xmltv_id="RTHKTV33.hk" site_id="33">TV 33</channel>
|
||||
<channel site="rthk.hk" lang="en" xmltv_id="RTHKTV34.hk" site_id="34">TV 34</channel>
|
||||
<channel site="rthk.hk" lang="zh" xmltv_id="RTHKTV31.hk" site_id="31">TV 31</channel>
|
||||
<channel site="rthk.hk" lang="zh" xmltv_id="RTHKTV32.hk" site_id="32">TV 32</channel>
|
||||
<channel site="rthk.hk" lang="zh" xmltv_id="RTHKTV33.hk" site_id="33">TV 33</channel>
|
||||
<channel site="rthk.hk" lang="zh" xmltv_id="RTHKTV34.hk" site_id="34">TV 34</channel>
|
||||
</channels>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
const axios = require('axios')
|
||||
const dayjs = require('dayjs')
|
||||
const cheerio = require('cheerio')
|
||||
const utc = require('dayjs/plugin/utc')
|
||||
|
@ -50,7 +49,7 @@ function parseIcon($item) {
|
|||
|
||||
function parseCategories($item) {
|
||||
let cate = $item('.single-wrap').data('cate') || ''
|
||||
let [_, categories] = cate.match(/^\|(.*)\|$/) || [null, '']
|
||||
let [, categories] = cate.match(/^\|(.*)\|$/) || [null, '']
|
||||
|
||||
return categories.split('||').filter(Boolean)
|
||||
}
|
||||
|
@ -65,7 +64,7 @@ function parseSubTitle($item) {
|
|||
|
||||
function parseStart($item, date) {
|
||||
const timeRow = $item('.timeRow').text().trim()
|
||||
const [_, HH, mm] = timeRow.match(/^(\d+):(\d+)-/) || [null, null, null]
|
||||
const [, HH, mm] = timeRow.match(/^(\d+):(\d+)-/) || [null, null, null]
|
||||
if (!HH || !mm) return null
|
||||
|
||||
return dayjs.tz(`${date.format('YYYY-MM-DD')} ${HH}:${mm}`, 'YYYY-MM-DD HH:mm', 'Asia/Hong_Kong')
|
||||
|
@ -73,7 +72,7 @@ function parseStart($item, date) {
|
|||
|
||||
function parseStop($item, date) {
|
||||
const timeRow = $item('.timeRow').text().trim()
|
||||
const [_, HH, mm] = timeRow.match(/-(\d+):(\d+)$/) || [null, null, null]
|
||||
const [, HH, mm] = timeRow.match(/-(\d+):(\d+)$/) || [null, null, null]
|
||||
if (!HH || !mm) return null
|
||||
|
||||
return dayjs.tz(`${date.format('YYYY-MM-DD')} ${HH}:${mm}`, 'YYYY-MM-DD HH:mm', 'Asia/Hong_Kong')
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
// npx epg-grabber --config=sites/rthk.hk/rthk.hk.config.js --channels=sites/rthk.hk/rthk.hk.channels.xml --output=guide.xml --days=2
|
||||
// npm run grab -- --site=rthk.hk
|
||||
|
||||
const { parser, url, request } = require('./rthk.hk.config.js')
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const axios = require('axios')
|
||||
const dayjs = require('dayjs')
|
||||
const utc = require('dayjs/plugin/utc')
|
||||
const customParseFormat = require('dayjs/plugin/customParseFormat')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue