Update m.tv.sms.cz

This commit is contained in:
freearhey 2023-11-20 15:29:57 +03:00
parent 5a7d8694b4
commit 9900e58a32
2 changed files with 23 additions and 0 deletions

View file

@ -34,6 +34,28 @@ module.exports = {
}) })
return programs return programs
},
async channels() {
const axios = require('axios')
const data = await axios
.get(`https://m.tv.sms.cz/?zmen_stanice=true`)
.then(r => r.data)
.catch(console.log)
let channels = []
const $ = cheerio.load(data)
$('.stanice').each((i, el) => {
const name = $(el).attr('title')
const site_id = $(el).find('input').attr('value')
channels.push({
lang: 'cs',
site_id,
name
})
})
return channels
} }
} }

View file

@ -1,3 +1,4 @@
// npm run channels:parse -- --config=./sites/m.tv.sms.cz/m.tv.sms.cz.config.js --output=./sites/m.tv.sms.cz/m.tv.sms.cz.channels.xml
// npm run grab -- --site=m.tv.sms.cz // npm run grab -- --site=m.tv.sms.cz
const { parser, url } = require('./m.tv.sms.cz.config.js') const { parser, url } = require('./m.tv.sms.cz.config.js')