mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 17:10:07 -04:00
Update rev.bs.config.js
This commit is contained in:
parent
89e188382d
commit
3bd5de29f4
1 changed files with 2 additions and 12 deletions
|
@ -15,18 +15,8 @@ module.exports = {
|
||||||
url: function ({ date }) {
|
url: function ({ date }) {
|
||||||
return endpoint.replace('$date', date.format('YYYY-MM-DD')).replace('$index', 0)
|
return endpoint.replace('$date', date.format('YYYY-MM-DD')).replace('$index', 0)
|
||||||
},
|
},
|
||||||
logo: async function ({ channel }) {
|
logo({ channel }) {
|
||||||
const html = await axios
|
return channel.logo
|
||||||
.get('https://www.rev.bs/tv-guide')
|
|
||||||
.then(r => r.data)
|
|
||||||
.catch(console.log)
|
|
||||||
const $ = cheerio.load(html)
|
|
||||||
const script = $('body > script:nth-child(2)').html()
|
|
||||||
let channels = script.match(/Rev.TVGuide.channels = (.*);/i)[1] || ''
|
|
||||||
channels = JSON.parse(channels)
|
|
||||||
if (!channels[channel.site_id]) return null
|
|
||||||
|
|
||||||
return `https:${channels[channel.site_id].channel_image}`
|
|
||||||
},
|
},
|
||||||
parser: async function ({ content, channel, date }) {
|
parser: async function ({ content, channel, date }) {
|
||||||
const programs = []
|
const programs = []
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue