mirror of
https://github.com/iptv-org/epg
synced 2026-09-10 22:06:56 -04:00
Update watch.sportsnet.ca
This commit is contained in:
@@ -25,6 +25,25 @@ module.exports = {
|
||||
})
|
||||
|
||||
return programs
|
||||
},
|
||||
async channels() {
|
||||
const axios = require('axios')
|
||||
const html = await axios
|
||||
.get(`https://watch.sportsnet.ca/schedule/tvlistings`)
|
||||
.then(r => r.data)
|
||||
.catch(console.log)
|
||||
|
||||
let [, __data] = html.match(/window\.__data \= ([^<]+)<\/script>/)
|
||||
const func = new Function(`"use strict";return ${__data}`)
|
||||
const data = func()
|
||||
|
||||
return data.cache.list['678|page_size=24'].list.items.map(item => {
|
||||
return {
|
||||
lang: 'en',
|
||||
site_id: item.id,
|
||||
name: item.title
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user