mirror of
https://github.com/iptv-org/epg
synced 2025-12-16 02:16:40 -05:00
@@ -6,12 +6,21 @@ const customParseFormat = require('dayjs/plugin/customParseFormat')
|
||||
dayjs.extend(utc)
|
||||
dayjs.extend(customParseFormat)
|
||||
|
||||
const headers = {
|
||||
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
|
||||
"accept-language": "en",
|
||||
"sec-fetch-site": "same-origin",
|
||||
"sec-fetch-user": "?1",
|
||||
"upgrade-insecure-requests": "1",
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36"
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
site: 'mi.tv',
|
||||
days: 2,
|
||||
request: { headers },
|
||||
url({ date, channel }) {
|
||||
const [country, id] = channel.site_id.split('#')
|
||||
|
||||
return `https://mi.tv/${country}/async/channel/${id}/${date.format('YYYY-MM-DD')}/0`
|
||||
},
|
||||
parser({ content, date }) {
|
||||
@@ -104,4 +113,4 @@ function parseItems(content) {
|
||||
const $ = cheerio.load(content)
|
||||
|
||||
return $('#listings > ul > li').toArray()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user