mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
Merge pull request #179 from iptv-org/add-ignore-option
Add ignore option
This commit is contained in:
commit
d552efc5c4
4 changed files with 7 additions and 5 deletions
2
.github/workflows/auto-update.yml
vendored
2
.github/workflows/auto-update.yml
vendored
|
@ -31,7 +31,7 @@ jobs:
|
||||||
run: npm install
|
run: npm install
|
||||||
- name: Create Matrix
|
- name: Create Matrix
|
||||||
id: set-matrix
|
id: set-matrix
|
||||||
run: node scripts/create-matrix.js --exclude=sites/tvprofil.com/*,sites/znbc.co.zm/*
|
run: node scripts/create-matrix.js
|
||||||
grab:
|
grab:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: create-matrix
|
needs: create-matrix
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
const { Command } = require('commander')
|
const { Command } = require('commander')
|
||||||
const file = require('./file')
|
const file = require('./file')
|
||||||
|
const path = require('path')
|
||||||
|
|
||||||
const program = new Command()
|
const program = new Command()
|
||||||
program
|
program
|
||||||
|
@ -16,6 +17,9 @@ file.list('sites/*/*.channels.xml', options.include, options.exclude).then(files
|
||||||
|
|
||||||
files.forEach(filename => {
|
files.forEach(filename => {
|
||||||
const [_, site, country] = filename.match(/sites\/.*\/(.*)_(.*)\.channels\.xml/i)
|
const [_, site, country] = filename.match(/sites\/.*\/(.*)_(.*)\.channels\.xml/i)
|
||||||
|
const config = require(path.resolve(`./sites/${site}/${site}.config.js`))
|
||||||
|
|
||||||
|
if (config.ignore) return
|
||||||
|
|
||||||
matrix.guide.push({ site, country })
|
matrix.guide.push({ site, country })
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
// BUG: server is not stable
|
|
||||||
|
|
||||||
const cheerio = require('cheerio')
|
const cheerio = require('cheerio')
|
||||||
const dayjs = require('dayjs')
|
const dayjs = require('dayjs')
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
site: 'tvprofil.com',
|
site: 'tvprofil.com',
|
||||||
|
ignore: true, // NOTE: server is not stable
|
||||||
request: {
|
request: {
|
||||||
headers: {
|
headers: {
|
||||||
'x-requested-with': 'XMLHttpRequest'
|
'x-requested-with': 'XMLHttpRequest'
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
// BUG: site is down
|
|
||||||
|
|
||||||
const jsdom = require('jsdom')
|
const jsdom = require('jsdom')
|
||||||
const { JSDOM } = jsdom
|
const { JSDOM } = jsdom
|
||||||
const dayjs = require('dayjs')
|
const dayjs = require('dayjs')
|
||||||
|
@ -14,6 +12,7 @@ dayjs.extend(customParseFormat)
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
site: 'znbc.co.zm',
|
site: 'znbc.co.zm',
|
||||||
|
ignore: true, // NOTE: site is down
|
||||||
url({ channel }) {
|
url({ channel }) {
|
||||||
return `https://www.znbc.co.zm/${channel.site_id}/`
|
return `https://www.znbc.co.zm/${channel.site_id}/`
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue