Skip to content

Commit efe2f91

Browse files
Merge pull request #2882 from jimmyfortinx/fix/french-channels-tvpassport
French channels config for tvpassport.com
2 parents 7545302 + 979d4d7 commit efe2f91

File tree

2 files changed

+273
-1
lines changed

2 files changed

+273
-1
lines changed
Lines changed: 270 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,270 @@
1+
/**
2+
* Because there is no way to determine the language of the channel from the website, we need to hardcode the French channels.
3+
*/
4+
module.exports = new Set([
5+
'addik-tv-hd/6059',
6+
'addik-tv/2033',
7+
'artv-hd/5887',
8+
'artv/459',
9+
'canal-d-hd/3978',
10+
'canal-d-sur-demande/10895',
11+
'canal-d/108',
12+
'canal-vie-hd/3974',
13+
'canal-vie-sur-demande/10897',
14+
'canal-vie/307',
15+
'casa-hd/10211',
16+
'casa-sur-demande/10361',
17+
'casa/5484',
18+
'evasion-hd/6468',
19+
'evasion-sur-demande/9057',
20+
'evasion-sur-demande/31477',
21+
'evasion/343',
22+
'explora-hd/10299',
23+
'explora/10298',
24+
'historia-dv/8390',
25+
'historia-hd/3976',
26+
'historia-sur-demande/10899',
27+
'historia/345',
28+
'ici-television-cfhd-dt-montreal-qc-hd/13786',
29+
'ici-television-cfhd-dt-montreal-qc/11385',
30+
'ici-television-cfhd-dt-montreal-qc/26780',
31+
'ici-television-quebec-hd/32137',
32+
'ici-television-quebec/32134',
33+
'lcn-hd/7321',
34+
'lcn/432',
35+
'prise-2-hd/10848',
36+
'prise-2-sur-demande/10768',
37+
'prise-2/2848',
38+
'rdi-news-hd/5888',
39+
'rdi-news/8',
40+
'rds-2-hd/9970',
41+
'rds-2/9705',
42+
'rds-info-hd/10849',
43+
'rds-info/3889',
44+
'rds-reseau-des-sports-hd/5582',
45+
'rds-reseau-des-sports/47',
46+
'ici-cbaft-moncton-nb-hd/6816',
47+
'ici-cbaft-moncton-nb/118',
48+
'ici-cbeft-windsor/3883',
49+
'ici-cbfj-st-johns-nf-hd/6818',
50+
'ici-cbfj-st-johns-nf/5476',
51+
'ici-cbfst-src-nord-qc-hd/9671',
52+
'ici-cbfst-src-nord/598',
53+
'ici-cbft-montreal-qc-dv/5935',
54+
'ici-cbft-montreal-qc-hd/2837',
55+
'ici-cbft-montreal-qc/196',
56+
'ici-cbgat-gaspe-qc-hd/9670',
57+
'ici-cbgat-gaspe-qc/2167',
58+
'ici-cbhft-halifax-ns-hd/6817',
59+
'ici-cbhft-halifax-ns/3882',
60+
'ici-cbkft-regina-sk-hd/6819',
61+
'ici-cbkft-regina-sk/287',
62+
'ici-cblft-toronto-hd/3626',
63+
'ici-cblft-toronto/14',
64+
'ici-cboft-ottawa-on-dv/14158',
65+
'ici-cboft-ottawa-on-hd/6768',
66+
'ici-cboft-ottawa-on/463',
67+
'ici-cbrft-calgary-ab-dv/14160',
68+
'ici-cbrft-calgary-ab-hd/9610',
69+
'ici-cbrft-calgary-ab/3980',
70+
'ici-cbst-sept-iles-qc-hd/9673',
71+
'ici-cbst-sept-iles-qc/3299',
72+
'ici-cbuft-vancouver-bc-hd/6769',
73+
'ici-cbuft-vancouver-bc/188',
74+
'ici-cbvt-quebec-qc--digital/5948',
75+
'ici-cbvt-quebec-qc-hd/6820',
76+
'ici-cbvt-quebec-qc/562',
77+
'ici-cbwft-winnipeg-mb-hd/6770',
78+
'ici-cbwft-winnipeg-mb/144',
79+
'ici-cbxft-edmonton-ab-dv/14159',
80+
'ici-cbxft-edmonton-ab-hd/9609',
81+
'ici-cbxft-edmonton-ab/174',
82+
'ici-cjbr-rimouski-qc-hd/9668',
83+
'ici-cjbr-rimouski-qc/2170',
84+
'ici-cjdg-dt-val-dor-qc/14060',
85+
'ici-cjdg-tv-2-lebel-sur-quevillon-qc/14062',
86+
'ici-cjdg-tv-3-joutel-qc/14064',
87+
'ici-cjdg-tv-4-matagami-qc-hd/14067',
88+
'ici-cjdg-tv-4-matagami-qc/14066',
89+
'ici-ckrn-rouyn-qc-hd/9669',
90+
'ici-ckrn-rouyn-qc/1036',
91+
'ici-ckrn-tv-2-ville-marie-qc/14056',
92+
'ici-ckrn-tv-3-bearnfabre-qc/14058',
93+
'ici-ckrt-dt-1-baie-st-paul-qc/14050',
94+
'ici-ckrt-dt-2-degelis-qc/14051',
95+
'ici-ckrt-dt-3-riviere-du-loup-qc/14052',
96+
'ici-ckrt-dt-4-cabano-qc/14053',
97+
'ici-ckrt-dt-5-st-urbain-qc/14054',
98+
'ici-ckrt-dt-6-trois-pistoles-qc/14055',
99+
'ici-ckrt-riviere-du-loup-qc-hd/10928',
100+
'ici-ckrt-riviere-du-loup-qc/499',
101+
'ici-cksh-sherbrooke-qc--digital/5936',
102+
'ici-cksh-sherbrooke-qc-hd/9672',
103+
'ici-cksh-sherbrooke-qc/2169',
104+
'ici-cktm-trois-rivieres-qc--digital/5946',
105+
'ici-cktm-trois-rivieres-qc-hd/9674',
106+
'ici-cktm-trois-rivieres-qc/550',
107+
'ici-cktv-jonquiere-qc-hd/10968',
108+
'ici-cktv-jonquiere-qc/606',
109+
'ici-cktv-saguenay-qc-hd/9667',
110+
'ici-cktv-saguenay-qc/564',
111+
'ici-explora-sur-demand/10767',
112+
'ici-musique-montreal-1007-cbfx/37551',
113+
'ici-musique-rimouski-1015-cbrx/35693',
114+
'ici-musique-trois-rivieres-1043-cbfm/35679',
115+
'ici-premiere-gaspesie-893-cbga/37527',
116+
'ici-premiere-montreal-951-cbf/35702',
117+
'ici-premiere-rimouski-891-cjbr/35692',
118+
'ici-premiere-saguenay-937-cbj/37534',
119+
'ici-premiere-sept-iles-981-cbsi/37530',
120+
'ici-premiere-sherbrooke-1011-cbf/35703',
121+
'ici-premiere-trois-rivieres-881-cbf/35691',
122+
'ici-radio-canada-sur-demand/9059',
123+
'ici-television-cfhd-dt-montreal-qc-hd/13786',
124+
'ici-television-cfhd-dt-montreal-qc/11385',
125+
'ici-television-cfhd-dt-montreal-qc/26780',
126+
'ici-television-quebec-hd/32137',
127+
'ici-television-quebec/32134',
128+
'super-ecran-2-hd/8459',
129+
'super-ecran-2/362',
130+
'super-ecran-3-hd/9822',
131+
'super-ecran-3/410',
132+
'super-ecran-4-hd/9825',
133+
'super-ecran-4/411',
134+
'super-ecran-hd-1/5898',
135+
'super-ecran-sur-demande/3426',
136+
'super-ecran/57',
137+
'tva-cfcm-quebec--digital/5931',
138+
'tva-cfcm-quebec-hd/11116',
139+
'tva-cfcm-quebec/1031',
140+
'tva-cfem-rouyn-hd/15399',
141+
'tva-cfem-rouyn/2540',
142+
'tva-cfer-rimouski-hd/31497',
143+
'tva-cfer-rimouski/1034',
144+
'tva-cftm-montreal-hd/5934',
145+
'tva-cftm-montreal/106',
146+
'tva-cftm-west-feed-hd/32777',
147+
'tva-cftm-west-feed/1753',
148+
'tva-chau-carleton-hd/9976',
149+
'tva-chau-carleton/141',
150+
'tva-chau-dt-1-ste-marguerite-marie-qc/13903',
151+
'tva-chau-dt-2-st-quentin-nb/13906',
152+
'tva-chau-dt-3-port-daniel-qc/13907',
153+
'tva-chau-dt-4-chandler-qc/13908',
154+
'tva-chau-dt-6-gaspe-qc/13909',
155+
'tva-chau-dt-7-riviere-au-renard-qc',
156+
'tva-chau-dt-8-cloridorme-qc',
157+
'tva-chau-dt-9-lanse-a-valleau-qc/13912',
158+
'tva-chau-dt-10-tracadie-nb/13904',
159+
'tva-chau-dt-11-kedgwick-nb/13905',
160+
'tva-chau-dt-51-perce-qc/13902',
161+
'tva-chem-trois-rivieres-mauricie-hd/11118',
162+
'tva-chem-trois-rivieres/1033',
163+
'tva-chem-trois-riviers--digital/5933',
164+
'tva-chlt-sherbrooke--digital/5932',
165+
'tva-chlt-sherbrooke-hd/11117',
166+
'tva-chlt-sherbrooke/1032',
167+
'tva-chot-gatineau-qc-hd/31494',
168+
'tva-chot-gatineau-qc/4',
169+
'tva-cimt-dt-1-edmundston-nb/14069',
170+
'tva-cimt-dt-2-trois-pistoles-qc/14070',
171+
'tva-cimt-dt-4-baie-st-paul-qc/14071',
172+
'tva-cimt-dt-5-st-urbain-qc/14072',
173+
'tva-cimt-dt-6-riviere-du-loup-qc/14073',
174+
'tva-cimt-dt-7-les-escoumins-qc/14074',
175+
'tva-cimt-dt-8-cabano-qc/14075',
176+
'tva-cimt-riviere-du-loup-hd/31589',
177+
'tva-cimt-riviere-du-loup/317',
178+
'tva-cjpm-saguenay-chicoutimi-qc-hd/31496',
179+
'tva-cjpm-saguenay-qc/1035',
180+
'tva-hd/4354',
181+
'tva-sports-2-hd/13778',
182+
'tva-sports-2/13777',
183+
'tva-sports-3-hd/15116',
184+
'tva-sports-3/14946',
185+
'tva-sports-hd/9824',
186+
'tva-sports/9823',
187+
'noovo-cfap-quebec-qc-hd/5937',
188+
'noovo-cfap-quebec-qc/2179',
189+
'noovo-cfgs-gatineau-qc-hd/31506',
190+
'noovo-cfgs-gatineau-qc/5',
191+
'noovo-cfjp-montreal-qc/301',
192+
'noovo-cfjp-montrealqc-hd/5940',
193+
'noovo-cfkm-trois-rivieres-qc-hd/5938',
194+
'noovo-cfkm-trois-rivieres-qc/2180',
195+
'noovo-cfks-sherbrooke-qc-hd/5939',
196+
'noovo-cfks-sherbrooke-qc/2181',
197+
'noovo-cfrs-saguenaylac-st-jean-qc-hd/31495',
198+
'noovo-cfrs-saguenaylac-st-jean-qc/2183',
199+
'noovo-cftf-dt-1-edmundston-nb/13995',
200+
'noovo-cftf-dt-2-trois-pistoles-qc/13998',
201+
'noovo-cftf-dt-3-cabano-qc/13999',
202+
'noovo-cftf-dt-4-forestville-qc/14000',
203+
'noovo-cftf-dt-5-baie-comeau-qc/14001',
204+
'noovo-cftf-dt-6-riviere-du-loup-qc/14002',
205+
'noovo-cftf-dt-7-sept-iles-qc/14003',
206+
'noovo-cftf-dt-8-les-escoumins-qc/14004',
207+
'noovo-cftf-dt-9-gaspe-qc/14005',
208+
'noovo-cftf-dt-10-baie-st-paul-qc/13996',
209+
'noovo-cftf-dt-11-carleton-qc/13997',
210+
'noovo-cftf-riviere-du-loup-qc/1272',
211+
'noovo-cfvs-dt-1-rouyn-noranda-qc/14008',
212+
'noovo-cfvs-val-dor-qc/2184',
213+
'noovo-cjpc-dt-rimouski-qc/13994',
214+
'noovo-hd/4884',
215+
'series--dv/8394',
216+
'series--hd/3975',
217+
'series--sur-demande/10898',
218+
'series-/341',
219+
'z-dv/8402',
220+
'z-hd/3979',
221+
'zeste-hd/7943',
222+
'zeste/7508',
223+
'zeste-sur-demande/9058',
224+
'qub/7616',
225+
'qub-hd/7617',
226+
'tele-quebec-civa-dt-1-rouyn-noranda-qc/14082',
227+
'tele-quebec-civa-val-dor-hd/6458',
228+
'tele-quebec-civa-val-dor/1134',
229+
'tele-quebec-civb-dt-1-grand-fonds-qc/14083',
230+
'tele-quebec-civb-rimouski-hd/6459',
231+
'tele-quebec-civb-rimouski/1135',
232+
'tele-quebec-civc-trois-rivieres-hd/6460',
233+
'tele-quebec-civc-trois-rivieres/1136',
234+
'tele-quebec-civf-baie-trinite-hd/6461',
235+
'tele-quebec-civf-baie-trinite/1137',
236+
'tele-quebec-civg-sept-iles-hd/6462',
237+
'tele-quebec-civg-sept-iles/1138',
238+
'tele-quebec-civk-carleton-hd/6463',
239+
'tele-quebec-civk-carleton/1139',
240+
'tele-quebec-civk-dt-1-gascons-qc/14078',
241+
'tele-quebec-civk-dt-2-perce-qc/14076',
242+
'tele-quebec-civk-dt-3-gaspe-qc/14077',
243+
'tele-quebec-civm-montreal-hd/6464',
244+
'tele-quebec-civm-montreal/1140',
245+
'tele-quebec-civo-hull-hd/6465',
246+
'tele-quebec-civo-hull/1141',
247+
'tele-quebec-civp-chapeau/1142',
248+
'tele-quebec-civq-quebec-hd/6466',
249+
'tele-quebec-civq-quebec/1058',
250+
'tele-quebec-civs-sherbrooke-hd/5951',
251+
'tele-quebec-civs-sherbrooke/52',
252+
'tele-quebec-civv-chicoutimi-hd/6467',
253+
'tele-quebec-civv-chicoutimi/1143',
254+
'telemagino/8019',
255+
'temoin-hd/9155',
256+
'temoin-sur-demande/10360',
257+
'temoin/9109',
258+
'investigation-hd/11345',
259+
'investigation-sur-demande/15115',
260+
'investigation/11344',
261+
'assemblee-nationale-du-quebec/431',
262+
'elle-fictions-hd/9111',
263+
'elle-fictions/101',
264+
'frissons-tv-hd/32126',
265+
'frissons-tv/32125',
266+
'max-hd/9112',
267+
'max/306',
268+
'cinepop-hd/9156',
269+
'cinepop/2325'
270+
])

sites/tvpassport.com/tvpassport.com.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const utc = require('dayjs/plugin/utc')
55
const timezone = require('dayjs/plugin/timezone')
66
const customParseFormat = require('dayjs/plugin/customParseFormat')
77
const doFetch = require('@ntlab/sfetch')
8+
const FRENCH_CHANNELS = require('./__data__/frenchChannels.js')
89

910
dayjs.extend(utc)
1011
dayjs.extend(timezone)
@@ -90,9 +91,10 @@ module.exports = {
9091
const $channelPage = cheerio.load(res)
9192
const title = $channelPage('meta[property="og:title"]').attr('content')
9293
const name = title.replace('TV Schedule for ', '')
94+
const lang = FRENCH_CHANNELS.has(site_id) ? 'fr' : 'en'
9395

9496
channels.push({
95-
lang: 'en',
97+
lang,
9698
site_id,
9799
name
98100
})

0 commit comments

Comments
 (0)