From 04f1670a27e0bafeddef4114305976b0d44b15c6 Mon Sep 17 00:00:00 2001 From: freearhey Date: Thu, 18 Mar 2021 17:17:17 +0300 Subject: [PATCH] Update ontvtonight.com.config.js --- sites/ontvtonight.com.config.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sites/ontvtonight.com.config.js b/sites/ontvtonight.com.config.js index 9c6fd548..5849b904 100644 --- a/sites/ontvtonight.com.config.js +++ b/sites/ontvtonight.com.config.js @@ -13,9 +13,14 @@ module.exports = { channels: 'ontvtonight.com.channels.xml', output: '.gh-pages/guides/ontvtonight.com.guide.xml', url: function ({ date, channel }) { - return `https://www.ontvtonight.com/uk/guide/listings/channel/${ - channel.site_id - }.html?dt=${date.format('YYYY-MM-DD')}` + const [region, id] = channel.site_id.split('#') + return region + ? `https://www.ontvtonight.com/${region}/guide/listings/channel/${id}.html?dt=${date.format( + 'YYYY-MM-DD' + )}` + : `https://www.ontvtonight.com/guide/listings/channel/${id}.html?dt=${date.format( + 'YYYY-MM-DD' + )}` }, parser: function ({ content, date }) { const programs = []