diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml index de8c197f..0df3b11f 100644 --- a/.github/workflows/auto-update.yml +++ b/.github/workflows/auto-update.yml @@ -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 diff --git a/scripts/create-matrix.js b/scripts/create-matrix.js index 897919de..44f01f53 100644 --- a/scripts/create-matrix.js +++ b/scripts/create-matrix.js @@ -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 }) }) diff --git a/sites/tvprofil.com/tvprofil.com.config.js b/sites/tvprofil.com/tvprofil.com.config.js index 93e921b3..4b443384 100644 --- a/sites/tvprofil.com/tvprofil.com.config.js +++ b/sites/tvprofil.com/tvprofil.com.config.js @@ -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' diff --git a/sites/znbc.co.zm/znbc.co.zm.config.js b/sites/znbc.co.zm/znbc.co.zm.config.js index f4eb2520..cd3d4944 100644 --- a/sites/znbc.co.zm/znbc.co.zm.config.js +++ b/sites/znbc.co.zm/znbc.co.zm.config.js @@ -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}/` },