+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From b622c63826a0d98a218c0fc4044da8a9ac6cb533 Mon Sep 17 00:00:00 2001
From: freearhey <7253922+freearhey@users.noreply.github.com>
Date: Sat, 25 Nov 2023 17:36:27 +0300
Subject: [PATCH 3/4] Create mytelly.co.uk.config.js
---
sites/mytelly.co.uk/mytelly.co.uk.config.js | 133 ++++++++++++++++++++
1 file changed, 133 insertions(+)
create mode 100644 sites/mytelly.co.uk/mytelly.co.uk.config.js
diff --git a/sites/mytelly.co.uk/mytelly.co.uk.config.js b/sites/mytelly.co.uk/mytelly.co.uk.config.js
new file mode 100644
index 00000000..7272a0a6
--- /dev/null
+++ b/sites/mytelly.co.uk/mytelly.co.uk.config.js
@@ -0,0 +1,133 @@
+const cheerio = require('cheerio')
+const dayjs = require('dayjs')
+const utc = require('dayjs/plugin/utc')
+const timezone = require('dayjs/plugin/timezone')
+const customParseFormat = require('dayjs/plugin/customParseFormat')
+
+dayjs.extend(utc)
+dayjs.extend(timezone)
+dayjs.extend(customParseFormat)
+
+module.exports = {
+ site: 'mytelly.co.uk',
+ days: 2,
+ url: function ({ date, channel }) {
+ return `https://www.mytelly.co.uk/tv-guide/listings/channel/${
+ channel.site_id
+ }.html?dt=${date.format('YYYY-MM-DD')}`
+ },
+ parser: function ({ content, date, channel }) {
+ const programs = []
+ const items = parseItems(content)
+ items.forEach(item => {
+ const prev = programs[programs.length - 1]
+ const $item = cheerio.load(item)
+ let start = parseStart($item, date, channel)
+ if (prev) {
+ if (start.isBefore(prev.start)) {
+ start = start.add(1, 'd')
+ date = date.add(1, 'd')
+ }
+ prev.stop = start
+ }
+ const stop = start.add(30, 'm')
+ programs.push({
+ title: parseTitle($item),
+ start,
+ stop
+ })
+ })
+
+ return programs
+ },
+ async channels() {
+ const axios = require('axios')
+ const _ = require('lodash')
+
+ const providers = [
+ '-3000053',
+ '-4000118',
+ '-11000199',
+ '-1000007',
+ '-2000007',
+ '-12000220',
+ '-5000136',
+ '-10000178'
+ ]
+ const regions = [
+ 'Cambridgeshire',
+ 'Channel Islands',
+ 'Cumbria',
+ 'East',
+ 'East Midlands',
+ 'Yorkshire & Lincolnshire',
+ 'London',
+ 'North East',
+ 'North West',
+ 'Northern Ireland',
+ 'Oxfordshire',
+ 'Scotland (Borders)',
+ 'Scotland (Central)',
+ 'Scotland (North)',
+ 'South',
+ 'South East',
+ 'South West',
+ 'Wales',
+ 'West',
+ 'West Midlands',
+ 'Yorkshire'
+ ]
+
+ const channels = []
+ for (let provider of providers) {
+ for (let region of regions) {
+ const data = await axios
+ .post(`https://www.mytelly.co.uk/tv-guide/schedule`, null, {
+ params: {
+ provider,
+ region,
+ TVperiod: 'Night',
+ date: dayjs().format('YYYY-MM-DD'),
+ st: 0,
+ u_time: 1955,
+ is_mobile: 1
+ }
+ })
+ .then(r => r.data)
+ .catch(console.log)
+
+ const $ = cheerio.load(data)
+ $('.channelname').each((i, el) => {
+ const name = $(el).find('center > a:eq(1)').text()
+ const url = $(el).find('center > a:eq(1)').attr('href')
+ const [, number, slug] = url.match(/\/(\d+)\/(.*)\.html$/)
+
+ channels.push({
+ lang: 'en',
+ name,
+ site_id: `${number}/${slug}`
+ })
+ })
+ }
+ }
+
+ return _.uniqBy(channels, 'site_id')
+ }
+}
+
+function parseStart($item, date, channel) {
+ const timeString = $item('td:eq(0)').text().trim()
+ const dateString = `${date.format('YYYY-MM-DD')} ${timeString}`
+
+ return dayjs.tz(dateString, 'YYYY-MM-DD H:mm a', 'Europe/London')
+}
+
+function parseTitle($item) {
+ return $item('td:eq(1)').text().trim()
+}
+
+function parseItems(content) {
+ const $ = cheerio.load(content)
+
+ return $('table.table > tbody > tr').toArray()
+}
From 52bde51dbadca74729ee760a4f32b2f8180653e6 Mon Sep 17 00:00:00 2001
From: freearhey <7253922+freearhey@users.noreply.github.com>
Date: Sat, 25 Nov 2023 17:36:34 +0300
Subject: [PATCH 4/4] Create mytelly.co.uk.channels.xml
---
.../mytelly.co.uk/mytelly.co.uk.channels.xml | 489 ++++++++++++++++++
1 file changed, 489 insertions(+)
create mode 100644 sites/mytelly.co.uk/mytelly.co.uk.channels.xml
diff --git a/sites/mytelly.co.uk/mytelly.co.uk.channels.xml b/sites/mytelly.co.uk/mytelly.co.uk.channels.xml
new file mode 100644
index 00000000..db9e4130
--- /dev/null
+++ b/sites/mytelly.co.uk/mytelly.co.uk.channels.xml
@@ -0,0 +1,489 @@
+
+
+ 4Music
+ 4seven
+ 4seven HD
+ 5Action
+ 5Action HD
+ 5SELECT
+ 5STAR
+ 5STAR +1
+ 5USA
+ 5USA +1
+ Alibi
+ Alibi HD
+ Alibi +1
+ Al Jazeera English
+ Al Jazeera English HD
+ Animal Planet
+ Animal Planet HD
+ Animal Planet +1
+ Arirang HD
+ Ayozat TV
+ B4U Movies
+ B4U Music
+ Baby TV
+ BBC Alba
+ BBC Alba HD
+ BBC Four
+ BBC Four HD
+ BBC News
+ BBC News HD
+ BBC One
+ BBC One Cambridgeshire
+ BBC One Cambridgeshire HD
+ BBC One Channel Islands
+ BBC One Channel Islands HD
+ BBC One East
+ BBC One East HD
+ BBC One East Midlands
+ BBC One East Midlands HD
+ BBC One HD
+ BBC One London
+ BBC One London HD
+ BBC One North East & Cumbria
+ BBC One North East & Cumbria HD
+ BBC One Northern Ireland
+ BBC One Northern Ireland HD
+ BBC One North West
+ BBC One North West HD
+ BBC One Oxfordshire
+ BBC One Oxfordshire HD
+ BBC One Scotland
+ BBC One Scotland HD
+ BBC One South
+ BBC One South East
+ BBC One South East HD
+ BBC One South HD
+ BBC One South West
+ BBC One South West HD
+ BBC One Wales
+ BBC One Wales HD
+ BBC One West
+ BBC One West HD
+ BBC One West Midlands
+ BBC One West Midlands HD
+ BBC One Yorkshire
+ BBC One Yorkshire HD
+ BBC One Yorkshire & Lincolnshire HD
+ BBC Parliament
+ BBC Parliament HD
+ BBC Red Button 1
+ BBC Red Button 1 HD
+ BBC Red Button HD
+ BBC Scotland
+ BBC Scotland HD
+ BBC Scotland HD (Freeview)
+ BBC Three
+ BBC Three HD
+ BBC Two England
+ BBC Two HD
+ BBC Two Northern Ireland
+ BBC Two Northern Ireland HD
+ BBC Two Wales
+ BBC Two Wales HD
+ Blaze
+ Blaze (Freeview)
+ Bloomberg HD
+ Boomerang
+ Boomerang HD
+ Boomerang +1
+ Cartoonito
+ Cartoon Network
+ Cartoon Network HD
+ Cartoon Network +1
+ CBBC
+ CBBC HD
+ CBeebies
+ CBeebies HD
+ CBS Reality
+ CBS Reality +1
+ Challenge
+ Channel 4
+ Channel 4 HD
+ Channel 4 +1
+ Channel 5
+ Channel 5 HD
+ Channel 5 +1
+ Channels 24
+ Clubland TV
+ CNBC UK
+ CNBC UK HD
+ CNN
+ CNN HD
+ Colors Cineplex
+ Colors Gujrati
+ Colors
+ Colors HD
+ Colors Rishtey
+ Comedy Central
+ Comedy Central Extra
+ Comedy Central HD
+ Comedy Central +1
+ Create & Craft
+ Create & Craft HD
+ Crime + Investigation
+ Crime + Investigation HD
+ Crime + Investigation +1
+ Cula4 HD
+ Dave
+ Dave HD
+ Dave ja vu
+ Discovery Channel
+ Discovery Channel HD
+ Discovery Channel +1
+ Discovery History
+ Discovery History +1
+ Discovery Science
+ Discovery Science +1
+ Discovery Turbo
+ Discovery Turbo +1
+ DMAX
+ DMAX +1
+ Drama
+ Drama HD
+ Drama +1
+ E! Entertainment
+ E4
+ E4 Extra
+ E4 HD
+ E4 +1
+ Earthx TV
+ Eden
+ Eden HD
+ Eden +1
+ E! Entertainment HD
+ Euronews
+ Eurosport 1
+ Eurosport 1 HD
+ Eurosport 2
+ Eurosport 2 HD
+ Film4
+ Film4 HD
+ Film4 +1
+ Food Network
+ Food Network +1
+ Foodxp
+ France 24 English
+ France 24 English HD
+ GB News
+ GB News HD
+ GEO News
+ GEO TV
+ GOLD
+ GOLD HD
+ GOLD +1
+ GREAT! action
+ GREAT! action +1
+ GREAT! movies
+ GREAT! movies +1
+ GREAT! movies christmas
+ GREAT! movies christmas +1
+ GREAT! tv
+ GREAT! tv +1
+ HGTV
+ HGTV +1
+ HorrorXtra
+ HorrorXtra +1
+ Ideal World
+ Investigation Discovery
+ Investigation Discovery +1
+ ITV1 Anglia
+ ITV1 Anglia HD
+ ITV1 Anglia +1
+ ITV1 Border England
+ ITV1 Border HD
+ ITV1 Border Scotland
+ ITV1 Central
+ ITV1 Central HD
+ ITV1 Central +1
+ ITV1 Channel Television
+ ITV1 Granada
+ ITV1 Granada HD
+ ITV1 Granada +1
+ ITV1 London
+ ITV1 London HD
+ ITV1 London +1
+ ITV1 Meridian
+ ITV1 Meridian HD
+ ITV1 Meridian +1
+ ITV1 Tyne Tees
+ ITV1 Tyne Tees HD
+ ITV1 Tyne Tees +1
+ ITV1 Wales
+ ITV1 Wales HD
+ ITV1 Wales +1
+ ITV1 West
+ ITV1 West Country
+ ITV1 West Country HD
+ ITV1 West Country +1
+ ITV1 West HD
+ ITV1 West +1
+ ITV1 Yorkshire
+ ITV1 Yorkshire HD
+ ITV1 Yorkshire +1
+ ITV2
+ ITV2 HD
+ ITV2 +1
+ ITV3
+ ITV3 HD
+ ITV3 +1
+ ITV3 +1 (Freeview)
+ ITV4
+ ITV4 HD
+ ITV4 +1
+ ITVBe
+ ITVBe HD
+ ITVBe +1
+ Kerrang! TV
+ Kiss TV
+ Legend
+ LFC TV HD
+ London Live
+ Magic
+ More4
+ More4 HD
+ More4 +1
+ Christmas 24
+ Christmas 24+
+ MTV
+ MTV 80s
+ MTV 90s
+ MTV HD
+ MTV Hits
+ MTV Live HD
+ MTV Music
+ MUTV
+ MUTV HD
+ National Geographic Channel
+ National Geographic Channel HD
+ National Geographic Channel +1
+ National Geographic WILD
+ National Geographic WILD HD
+ NDTV 24x7
+ New Vision
+ NHK World
+ NHK World HD
+ Nickelodeon
+ Nickelodeon HD
+ Nickelodeon +1
+ Nick Jr.
+ Nick Jr. HD
+ Nick Jr. +1
+ Nick Jr. Peppa
+ NickLoudHouse
+ Notts TV
+ NOW 70s
+ NOW 80s
+ NOW Rock
+ PBS America
+ PBS America (Freeview)
+ Phoenix CNE Channel HD
+ Pop
+ Pop Max
+ Pop Max +1
+ Pop +1
+ Quest
+ Quest HD
+ Quest +1
+ Quest Red
+ Quest Red +1
+ QVC
+ QVC2
+ QVC Beauty
+ QVC Extra
+ QVC HD
+ QVC Style
+ QVC Style HD
+ Racing TV
+ Racing TV HD
+ RealityXtra
+ Really
+ RTE2
+ RTE2 HD
+ RTE Jr
+ RTE News
+ RTE One
+ S4C
+ S4C HD
+ Sanskar
+ Sky Arts
+ Sky Arts HD
+ Sky Atlantic
+ Sky Atlantic HD
+ Sky Atlantic +1
+ Sky Cinema Action
+ Sky Cinema Action HD
+ Sky Cinema Animation
+ Sky Cinema Animation HD
+ Sky Cinema Comedy
+ Sky Cinema Comedy HD
+ Sky Cinema Christmas
+ Sky Cinema Christmas HD
+ Sky Cinema Family
+ Sky Cinema Family HD
+ Sky Cinema Greats
+ Sky Cinema Greats HD
+ Sky Cinema Bourne
+ Sky Cinema Hits HD
+ Sky Cinema Premiere
+ Sky Cinema Premiere HD
+ Sky Cinema Premiere +1
+ Sky Cinema Sci-fi/Horror
+ Sky Cinema Sci-fi/Horror HD
+ Sky Cinema Heroines
+ Sky Cinema Heroines HD
+ Sky Cinema Thriller
+ Sky Cinema Thriller HD
+ Sky Comedy
+ Sky Comedy HD
+ Sky Crime
+ Sky Crime HD
+ Sky Crime +1
+ Sky Documentaries
+ Sky Documentaries HD
+ Sky History
+ Sky History 2
+ Sky History 2 HD
+ Sky History HD
+ Sky History +1
+ Sky Kids
+ Sky Kids HD
+ Sky Max
+ Sky Max HD
+ Sky Mix
+ Sky Mix HD
+ Sky Nature
+ Sky Nature HD
+ Sky News
+ Sky News HD
+ Sky Replay
+ Sky Sci-Fi
+ Sky Sci-Fi HD
+ Sky Showcase
+ Sky Showcase HD
+ Sky Showcase +1
+ Sky Sports Arena
+ Sky Sports Arena HD
+ Sky Sports Box Office
+ Sky Sports Cricket
+ Sky Sports Cricket HD
+ Sky Sports F1
+ Sky Sports F1 HD
+ Sky Sports Football
+ Sky Sports Football HD
+ Sky Sports Golf
+ Sky Sports Golf HD
+ Sky Sports Main Event
+ Sky Sports Main Event HD
+ Sky Sports Main Event Ultra HDR
+ Sky Sports Mix
+ Sky Sports Mix HD
+ Sky Sports News
+ Sky Sports News HD
+ Sky Sports NFL
+ Sky Sports NFL HD
+ Sky Sports Premier League
+ Sky Sports Premier League HD
+ Sky Sports Racing
+ Sky Sports Racing HD
+ Sky Witness
+ Sky Witness HD
+ Sky Witness +1
+ Sony Entertainment TV Asia
+ Sony Entertainment TV Asia HD
+ Sony MAX 2
+ Sony MAX
+ Sony MAX HD
+ Sony SAB
+ Sportystuff TV HD
+ STV Central
+ STV Central +1
+ STV HD
+ STV North
+ STV North +1
+ TalkBirmingham
+ TalkBristol
+ TalkCardiff
+ Talking Pictures TV
+ TalkLeeds
+ TalkLiverpool
+ TalkNorthWales
+ TalkTeesside
+ Talk TV
+ Talk TV HD
+ TalkTyne&Wear
+ TG4
+ TG4 HD
+ That's 60s
+ That's 60s (MCR Freeview)
+ That's Christmas
+ That's 70s (MCR Freeview)
+ That's 80s
+ That's 80s (Freeview)
+ That's 90s
+ That's 90s (MCR Freeview)
+ That's TV
+ That's TV (Freeview)
+ The Box
+ Tiny Pop
+ Tiny Pop (Freeview)
+ Tiny Pop +1
+ TLC
+ TLC HD
+ TLC +1
+ TNT Sports 1
+ TNT Sports 10
+ TNT Sports 10 HD
+ TNT Sports 1 HD
+ TNT Sports 2
+ TNT Sports 2 HD
+ TNT Sports 3
+ TNT Sports 3 HD
+ TNT Sports 4
+ TNT Sports 4 HD
+ TNT Sports 5
+ TNT Sports 5 HD
+ TNT Sports 6
+ TNT Sports 6 HD
+ TNT Sports 7
+ TNT Sports 7 HD
+ TNT Sports 8
+ TNT Sports 8 HD
+ TNT Sports 9
+ TNT Sports 9 HD
+ TNT Sports Box Office HD 2
+ Sky Sports Box Office HD
+ TNT Sports Box Office HD
+ TNT Sports Ultimate
+ TNT Sports Ultimate
+ Together TV
+ Together TV +1
+ Trace Vault
+ Travelxp
+ TRT World
+ TRT World HD
+ TVC News
+ Utsav Bharat
+ Utsav Gold
+ Utsav Gold HD
+ Utsav Plus
+ Utsav Plus HD
+ UTV
+ UTV HD
+ UTV +1
+ Viaplay Sports 1 HD
+ Viaplay Sports 2 HD
+ Viaplay Xtra HD
+ W
+ W HD
+ WildEarth
+ W +1
+ Yesterday
+ Yesterday HD
+ Yesterday +1
+ Zee Cinema HD
+ Zee Cinema
+ Zee TV HD
+ Zee TV
+