Merge pull request #179 from iptv-org/add-ignore-option

Add ignore option
This commit is contained in:
Aleksandr Statciuk 2021-10-31 23:55:41 +03:00 committed by GitHub
commit d552efc5c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 5 deletions

View File

@ -31,7 +31,7 @@ jobs:
run: npm install
- name: Create 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:
runs-on: ubuntu-latest
needs: create-matrix

View File

@ -1,5 +1,6 @@
const { Command } = require('commander')
const file = require('./file')
const path = require('path')
const program = new Command()
program
@ -16,6 +17,9 @@ file.list('sites/*/*.channels.xml', options.include, options.exclude).then(files
files.forEach(filename => {
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 })
})

View File

@ -1,10 +1,9 @@
// BUG: server is not stable
const cheerio = require('cheerio')
const dayjs = require('dayjs')
module.exports = {
site: 'tvprofil.com',
ignore: true, // NOTE: server is not stable
request: {
headers: {
'x-requested-with': 'XMLHttpRequest'

View File

@ -1,5 +1,3 @@
// BUG: site is down
const jsdom = require('jsdom')
const { JSDOM } = jsdom
const dayjs = require('dayjs')
@ -14,6 +12,7 @@ dayjs.extend(customParseFormat)
module.exports = {
site: 'znbc.co.zm',
ignore: true, // NOTE: site is down
url({ channel }) {
return `https://www.znbc.co.zm/${channel.site_id}/`
},