mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-09 08:30:06 -04:00
Site mytelly.co.uk now requires user agent.
Signed-off-by: Toha <tohenk@yahoo.com>
This commit is contained in:
parent
30dc0517be
commit
3fd6e47d4f
2 changed files with 11 additions and 6 deletions
|
@ -18,6 +18,12 @@ const tz = 'Europe/London'
|
||||||
module.exports = {
|
module.exports = {
|
||||||
site: 'mytelly.co.uk',
|
site: 'mytelly.co.uk',
|
||||||
days: 2,
|
days: 2,
|
||||||
|
request: {
|
||||||
|
headers: {
|
||||||
|
'User-Agent':
|
||||||
|
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36 OPR/117.0.0.0'
|
||||||
|
}
|
||||||
|
},
|
||||||
url({ date, channel }) {
|
url({ date, channel }) {
|
||||||
return `https://www.mytelly.co.uk/tv-guide/listings/channel/${
|
return `https://www.mytelly.co.uk/tv-guide/listings/channel/${
|
||||||
channel.site_id
|
channel.site_id
|
||||||
|
@ -36,7 +42,7 @@ module.exports = {
|
||||||
const td = $(el).find('td:eq(1)')
|
const td = $(el).find('td:eq(1)')
|
||||||
const title = td.find('h5 a')
|
const title = td.find('h5 a')
|
||||||
if (detailedGuide) {
|
if (detailedGuide) {
|
||||||
queues.push(title.attr('href'))
|
queues.push({ url: title.attr('href'), params: module.exports.request })
|
||||||
} else {
|
} else {
|
||||||
const subtitle = td.find('h6')
|
const subtitle = td.find('h6')
|
||||||
const time = $(el).find('td:eq(0)')
|
const time = $(el).find('td:eq(0)')
|
||||||
|
@ -115,7 +121,7 @@ module.exports = {
|
||||||
},
|
},
|
||||||
async channels() {
|
async channels() {
|
||||||
const channels = {}
|
const channels = {}
|
||||||
const queues = [{ t: 'p', method: 'post', url: 'https://www.mytelly.co.uk/getform' }]
|
const queues = [{ t: 'p', url: 'https://www.mytelly.co.uk/getform', params: this.request }]
|
||||||
await doFetch(queues, (queue, res) => {
|
await doFetch(queues, (queue, res) => {
|
||||||
// process form -> provider
|
// process form -> provider
|
||||||
if (queue.t === 'p') {
|
if (queue.t === 'p') {
|
||||||
|
@ -127,9 +133,8 @@ module.exports = {
|
||||||
const provider = opt.attr('value')
|
const provider = opt.attr('value')
|
||||||
queues.push({
|
queues.push({
|
||||||
t: 'r',
|
t: 'r',
|
||||||
method: 'post',
|
|
||||||
url: 'https://www.mytelly.co.uk/getregions',
|
url: 'https://www.mytelly.co.uk/getregions',
|
||||||
params: { provider }
|
params: { ...this.request, provider }
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -150,7 +155,7 @@ module.exports = {
|
||||||
t: 's',
|
t: 's',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
url: 'https://www.mytelly.co.uk/tv-guide/schedule',
|
url: 'https://www.mytelly.co.uk/tv-guide/schedule',
|
||||||
params
|
params: { ...this.request, data: params }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# mytelly.co.uk
|
# mytelly.co.uk
|
||||||
|
|
||||||
https://www.mytelly.co.uk/tv-guide/listings/tv-tonight.html
|
https://www.mytelly.co.uk/tv-guide/
|
||||||
|
|
||||||
### Download the guide
|
### Download the guide
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue