Merge channels.xml

This commit is contained in:
Aleksandr Statciuk
2023-01-05 15:28:24 +03:00
parent 915a53c5f2
commit 18a4c8f305
451 changed files with 2183 additions and 20292 deletions

View File

@@ -1,21 +1,10 @@
const axios = require('axios')
const dayjs = require('dayjs')
const domains = {
rs: '',
mk: '/mk',
me: '/me',
ba: '/ba'
}
module.exports = {
site: 'tvarenasport.com',
url: function ({ channel, date }) {
const [country] = channel.site_id.split('#')
return `https://www.tvarenasport.com${domains[country]}/api/schedule?date=${date.format(
'DD-MM-YYYY'
)}`
return `https://www.tvarenasport.com/api/schedule?date=${date.format('DD-MM-YYYY')}`
},
parser: function ({ content, channel }) {
let programs = []
@@ -32,9 +21,9 @@ module.exports = {
return programs
},
async channels({ country, lang }) {
async channels() {
const data = await axios
.get(`https://www.tvarenasport.com${domains[country]}/api/schedule`)
.get(`https://www.tvarenasport.com/api/schedule`)
.then(r => r.data)
.catch(console.log)
@@ -43,7 +32,7 @@ module.exports = {
const item = data.channels[id]
channels.push({
lang: 'sr',
site_id: `${country}#${id}`,
site_id: id,
name: item.name
})
}