mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-09 08:30:06 -04:00
Merge pull request #2731 from iptv-org/tohenk/fix-mytelly.co.uk
Site mytelly.co.uk now requires user agent.
This commit is contained in:
commit
f52927c0ec
2 changed files with 11 additions and 6 deletions
|
@ -18,6 +18,12 @@ const tz = 'Europe/London'
|
|||
module.exports = {
|
||||
site: 'mytelly.co.uk',
|
||||
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 }) {
|
||||
return `https://www.mytelly.co.uk/tv-guide/listings/channel/${
|
||||
channel.site_id
|
||||
|
@ -36,7 +42,7 @@ module.exports = {
|
|||
const td = $(el).find('td:eq(1)')
|
||||
const title = td.find('h5 a')
|
||||
if (detailedGuide) {
|
||||
queues.push(title.attr('href'))
|
||||
queues.push({ url: title.attr('href'), params: module.exports.request })
|
||||
} else {
|
||||
const subtitle = td.find('h6')
|
||||
const time = $(el).find('td:eq(0)')
|
||||
|
@ -115,7 +121,7 @@ module.exports = {
|
|||
},
|
||||
async 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) => {
|
||||
// process form -> provider
|
||||
if (queue.t === 'p') {
|
||||
|
@ -127,9 +133,8 @@ module.exports = {
|
|||
const provider = opt.attr('value')
|
||||
queues.push({
|
||||
t: 'r',
|
||||
method: 'post',
|
||||
url: 'https://www.mytelly.co.uk/getregions',
|
||||
params: { provider }
|
||||
params: { ...this.request, provider }
|
||||
})
|
||||
})
|
||||
}
|
||||
|
@ -150,7 +155,7 @@ module.exports = {
|
|||
t: 's',
|
||||
method: 'post',
|
||||
url: 'https://www.mytelly.co.uk/tv-guide/schedule',
|
||||
params
|
||||
params: { ...this.request, data: params }
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# mytelly.co.uk
|
||||
|
||||
https://www.mytelly.co.uk/tv-guide/listings/tv-tonight.html
|
||||
https://www.mytelly.co.uk/tv-guide/
|
||||
|
||||
### Download the guide
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue