From ba877ece1e6bae0a20a089c59d8a1684771c35b4 Mon Sep 17 00:00:00 2001
From: freearhey <7253922+freearhey@users.noreply.github.com>
Date: Tue, 14 Jan 2025 19:13:13 +0300
Subject: [PATCH 1/4] Delete comteco.com.bo.channels.xml
---
.../comteco.com.bo.channels.xml | 78 -------------------
1 file changed, 78 deletions(-)
delete mode 100644 sites/comteco.com.bo/comteco.com.bo.channels.xml
diff --git a/sites/comteco.com.bo/comteco.com.bo.channels.xml b/sites/comteco.com.bo/comteco.com.bo.channels.xml
deleted file mode 100644
index cc6d0f92..00000000
--- a/sites/comteco.com.bo/comteco.com.bo.channels.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-
-
- ATB
- PAT
- Sony Channel
- Abya Yala TV
- A&E
- AMC
- Animal Planet
- AXN
- Az Mundo
- Bolivia TV
- Bolivia TV 7.2 Deportes
- Bolivisión
- Cadena A
- Canal 24 Horas
- Caracol TV
- Cartoon Network
- Cinecanal Este
- Cinemax
- CNN
- Cubavisión
- De Película
- Discovery Channel
- Discovery Home & Health Latinoamérica
- Discovery Kids América Latina
- Disney Channel
- Disney Junior España
- El Gourmet
- El Trece
- E!
- EuroNews Español
- Europa Europa
- EWTN
- Fox Sports 2
- Fox Sports 3
- Fox Sports Latin America
- FXM
- FX
- HBO
- History
- HTV
- Investigation Discovery
- María+Visión
- Más Chic
- MTV Latino Norte
- Nat Geo Kids
- National Geographic
- Nickelodeon
- Record TV
- Red Uno
- RTP
- SBT
- Space México
- Star Channel
- Star Life
- Studio Universal
- TBS
- TCM
- Telefe Internacional
- Telemundo
- Telesur
- TLC
- Tlnovelas
- TNT
- TNT Series
- Tooncast
- TV Chile
- TV Culturas
- TVE
- TV Globo Internacional
- TV Perú
- TyC Sports
- Unitel Santa Cruz
- Universal TV
- VH1 East
- Warner Channel
-
\ No newline at end of file
From 8989cb8d3815e004a5d4bbd6798eab642f78d929 Mon Sep 17 00:00:00 2001
From: freearhey <7253922+freearhey@users.noreply.github.com>
Date: Tue, 14 Jan 2025 19:13:29 +0300
Subject: [PATCH 2/4] Delete comteco.com.bo.config.js
---
sites/comteco.com.bo/comteco.com.bo.config.js | 68 -------------------
1 file changed, 68 deletions(-)
delete mode 100644 sites/comteco.com.bo/comteco.com.bo.config.js
diff --git a/sites/comteco.com.bo/comteco.com.bo.config.js b/sites/comteco.com.bo/comteco.com.bo.config.js
deleted file mode 100644
index 2fbde814..00000000
--- a/sites/comteco.com.bo/comteco.com.bo.config.js
+++ /dev/null
@@ -1,68 +0,0 @@
-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: 'comteco.com.bo',
- days: 2,
- url: function ({ channel }) {
- return `https://comteco.com.bo/pages/canales-y-programacion-tv/paquete-oro/${channel.site_id}`
- },
- request: {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/x-www-form-urlencoded'
- },
- data: function ({ date }) {
- const params = new URLSearchParams()
- params.append('_method', 'POST')
- params.append('fechaini', date.format('D/M/YYYY'))
- params.append('fechafin', date.format('D/M/YYYY'))
-
- return params
- }
- },
- parser: function ({ content, date }) {
- 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)
- 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
- }
-}
-
-function parseStart($item, date) {
- const timeString = $item('div > div.col-xs-11 > p > span').text().trim()
- const dateString = `${date.format('YYYY-MM-DD')} ${timeString}`
-
- return dayjs.tz(dateString, 'YYYY-MM-DD HH:mm:ss', 'America/La_Paz')
-}
-
-function parseTitle($item) {
- return $item('div > div.col-xs-11 > p > strong').text().trim()
-}
-
-function parseItems(content) {
- const $ = cheerio.load(content)
-
- return $('#datosasociados > div > .list-group-item').toArray()
-}
From 5521c4e2e1c4b5946c1f48b4cce61d0caa3a5024 Mon Sep 17 00:00:00 2001
From: freearhey <7253922+freearhey@users.noreply.github.com>
Date: Tue, 14 Jan 2025 19:13:42 +0300
Subject: [PATCH 3/4] Delete comteco.com.bo.test.js
---
sites/comteco.com.bo/comteco.com.bo.test.js | 72 ---------------------
1 file changed, 72 deletions(-)
delete mode 100644 sites/comteco.com.bo/comteco.com.bo.test.js
diff --git a/sites/comteco.com.bo/comteco.com.bo.test.js b/sites/comteco.com.bo/comteco.com.bo.test.js
deleted file mode 100644
index 7801e22d..00000000
--- a/sites/comteco.com.bo/comteco.com.bo.test.js
+++ /dev/null
@@ -1,72 +0,0 @@
-const { parser, url, request } = require('./comteco.com.bo.config.js')
-const dayjs = require('dayjs')
-const utc = require('dayjs/plugin/utc')
-const customParseFormat = require('dayjs/plugin/customParseFormat')
-dayjs.extend(customParseFormat)
-dayjs.extend(utc)
-
-const date = dayjs.utc('2021-11-25', 'YYYY-MM-DD').startOf('d')
-const channel = {
- site_id: 'ABYA YALA',
- xmltv_id: 'AbyaYalaTV.bo'
-}
-const content =
- '
'
-
-it('can generate valid url', () => {
- expect(url({ channel })).toBe(
- 'https://comteco.com.bo/pages/canales-y-programacion-tv/paquete-oro/ABYA YALA'
- )
-})
-
-it('can generate valid request method', () => {
- expect(request.method).toBe('POST')
-})
-
-it('can generate valid request headers', () => {
- expect(request.headers).toMatchObject({
- 'Content-Type': 'application/x-www-form-urlencoded'
- })
-})
-
-it('can generate valid request data', () => {
- const result = request.data({ date })
- expect(result.get('_method')).toBe('POST')
- expect(result.get('fechaini')).toBe('25/11/2021')
- expect(result.get('fechafin')).toBe('25/11/2021')
-})
-
-it('can parse response', () => {
- const result = parser({ content, channel, date }).map(p => {
- p.start = p.start.toJSON()
- p.stop = p.stop.toJSON()
- return p
- })
-
- expect(result).toMatchObject([
- {
- start: '2021-11-25T04:00:00.000Z',
- stop: '2021-11-25T05:00:00.000Z',
- title: 'Abya Yala noticias - 3ra edición'
- },
- {
- start: '2021-11-25T05:00:00.000Z',
- stop: '2021-11-26T03:00:00.000Z',
- title: 'Cierre de emisión'
- },
- {
- start: '2021-11-26T03:00:00.000Z',
- stop: '2021-11-26T03:30:00.000Z',
- title: 'Referentes'
- }
- ])
-})
-
-it('can handle empty guide', () => {
- const result = parser({
- date,
- channel,
- content: ''
- })
- expect(result).toMatchObject([])
-})
From cd23e28e7e6018a5c0ab2c583801c17c02622693 Mon Sep 17 00:00:00 2001
From: freearhey <7253922+freearhey@users.noreply.github.com>
Date: Tue, 14 Jan 2025 19:13:55 +0300
Subject: [PATCH 4/4] Delete readme.md
---
sites/comteco.com.bo/readme.md | 15 ---------------
1 file changed, 15 deletions(-)
delete mode 100644 sites/comteco.com.bo/readme.md
diff --git a/sites/comteco.com.bo/readme.md b/sites/comteco.com.bo/readme.md
deleted file mode 100644
index 6ca36ec9..00000000
--- a/sites/comteco.com.bo/readme.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# comteco.com.bo
-
-https://www.comteco.com.bo/pages/canales-y-programacion-tv/
-
-### Download the guide
-
-```sh
-npm run grab --- --site=comteco.com.bo
-```
-
-### Test
-
-```sh
-npm test --- comteco.com.bo
-```