Merge pull request #1675 from RevGear/Canal+

Update Canal+
This commit is contained in:
Aleksandr Statciuk 2023-01-14 01:31:43 +03:00 committed by GitHub
commit 97ff7dfcf6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 2781 additions and 41 deletions

View file

@ -0,0 +1 @@
{"timeSlices":[{"timeSlice":"0","contents":[{"contentID":"20482220_50001","title":"Le cercle","subtitle":"Emission du 06 janv. 2023","startTime":1673504880000,"onClick":{"displayTemplate":"detailSeason","displayName":"Le cercle","path":"/cinema/le-cercle/h/4501558_50001","URLPage":"https://hodor.canalplus.pro/api/v2/mycanal/detail/da2291af3b10e9900d1c55e1a65d3388/okapi/6564630_50001.json?detailType=detailSeason&objectType=season&broadcastID=PLM_1196447642&episodeId=20482220_50001&brandID=4501558_50001&fromDiff=true","parameters":[{"in":"parameters","id":"featureToggles","enum":["detailV5"]}]}}],"context":{"context_type":"epg","context_page_title":"Guide - Grille TV - CANAL+ CINEMA","context_list_title":"CANAL+ CINEMA - J - Maintenant - Matin","context_list_id":"198","context_list_type":"epgGrid","context_list_position":1}},{"timeSlice":"1","contents":[{"contentID":"17230453_50001","title":"Illusions perdues","subtitle":"Film Drame","startTime":1673525160000,"onClick":{"displayTemplate":"detailPage","displayName":"Illusions perdues","path":"/cinema/illusions-perdues-film-drame/h/17230453_50001","URLPage":"https://hodor.canalplus.pro/api/v2/mycanal/detail/da2291af3b10e9900d1c55e1a65d3388/okapi/17230453_50001.json?detailType=detailPage&objectType=unit&broadcastID=PLM_1196447637&fromDiff=true","parameters":[{"in":"parameters","id":"featureToggles","enum":["detailV5"]}]}}],"context":{"context_type":"epg","context_page_title":"Guide - Grille TV - CANAL+ CINEMA","context_list_title":"CANAL+ CINEMA - J - Maintenant - Apres-midi","context_list_id":"198","context_list_type":"epgGrid","context_list_position":2}},{"timeSlice":"2","contents":[],"context":{"context_type":"epg","context_page_title":"Guide - Grille TV - CANAL+ CINEMA","context_list_title":"CANAL+ CINEMA - J - Maintenant - Debut de soiree","context_list_id":"198","context_list_type":"epgGrid","context_list_position":3}},{"timeSlice":"3","contents":[],"context":{"context_type":"epg","context_page_title":"Guide - Grille TV - CANAL+ CINEMA","context_list_title":"CANAL+ CINEMA - J - Maintenant - Soiree","context_list_id":"198","context_list_type":"epgGrid","context_list_position":4}},{"timeSlice":"4","contents":[],"context":{"context_type":"epg","context_page_title":"Guide - Grille TV - CANAL+ CINEMA","context_list_title":"CANAL+ CINEMA - J - Maintenant - Nuit","context_list_id":"198","context_list_type":"epgGrid","context_list_position":5}}]}

View file

@ -0,0 +1 @@
{"currentPage":{"displayTemplate":"error","displayName":"Page indisponible","path":"/erreur","BOName":"Page indisponible","BOLayoutName":"Erreur 400"},"title":"Page indisponible","text":"La page que vous demandez est indisponible. Si le problème persiste, vous pouvez contacter l'assistance de CANAL+.","code":400,"tracking":{"omniture":{"channel":"error","prop4":"error","prop5":"error - Page indisponible - channels_broadcast","prop10":"Contenu","prop11":"Autres","prop12":"Consumer","pageType":"errorPage","eVar14":"La page que vous demandez est indisponible. Si le problème persiste, vous pouvez contacter l'assistance de CANAL+.","pageName":"error - Page indisponible - channels_broadcast","error_message":"La page que vous demandez est indisponible. Si le problème persiste, vous pouvez contacter l'assistance de CANAL+.","page_level_1":"error","page_level_2":"Page indisponible - channels_broadcast","page_name":"error - Page indisponible - channels_broadcast","page_title":"Page indisponible","page_display_title":"Page indisponible","page_type":"errorPage","user_profile":"Consumer"},"dataLayer":{"error_message":"La page que vous demandez est indisponible. Si le problème persiste, vous pouvez contacter l'assistance de CANAL+.","page_level_1":"error","page_level_2":"Page indisponible - channels_broadcast","page_name":"error - Page indisponible - channels_broadcast","page_title":"Page indisponible","page_display_title":"Page indisponible","page_type":"errorPage","user_profile":"Consumer"}},"errorDetails":[{"message":"\"epgId\" must be a number","path":["epgId"],"type":"number.base"}]}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,452 @@
{
"currentPage": {
"displayTemplate": "detailPage",
"displayName": "Illusions perdues",
"path": "/cinema/illusions-perdues/h/17230453_50001"
},
"meta": {
"title": "Illusions perdues",
"description": "Pendant la Restauration, Lucien de Rubempré, jeune provincial d'Angoulême, se rêve poète. Il débarque à Paris en quête de gloire. Il a le soutien de Louise de Bargeton, une aristocrate qui croit en son talent. Pour gagner sa vie, Lucien trouve un emploi dans le journal dirigé par le peu scrupuleux Etienne Lousteau..."
},
"tracking": {
"omniture": {
"channel": "myCANAL",
"prop4": "myCANAL - Prog",
"prop5": "myCANAL - Prog - Fiche",
"prop6": "myCANAL - Prog - Fiche - Cinema",
"prop7": "myCANAL - Prog - Fiche - Cinema - Illusions perdues",
"pageName": "myCANAL - Prog - Fiche - Cinema - Illusions perdues",
"prop10": "Contenu",
"prop11": "DRM",
"content_protection": "DRM",
"prop12": "Consumer",
"eVar39": "17230453_50001",
"prop19": "CANAL+",
"prop32": "notInOffer",
"prop36": "Cinema",
"prop35": "Film Drame",
"content_title": "Illusions perdues",
"page_level_1": "Prog",
"page_level_2": "Fiche",
"page_level_3": "Cinema",
"page_level_4": "Illusions perdues",
"page_name": "myCANAL - Prog - Fiche - Cinema - Illusions perdues",
"page_title": "Illusions perdues",
"page_display_title": "Illusions perdues",
"user_profile": "Consumer",
"content_id": "17230453_50001",
"content_in_offer": "notInOffer",
"genre": "Cinema",
"subgenre": "Film Drame",
"channel_name": "CANAL+"
},
"dataLayer": {
"page_level_1": "Prog",
"page_level_2": "Fiche",
"page_level_3": "Cinema",
"page_level_4": "Illusions perdues",
"page_name": "myCANAL - Prog - Fiche - Cinema - Illusions perdues",
"page_title": "Illusions perdues",
"page_display_title": "Illusions perdues",
"user_profile": "Consumer",
"content_id": "17230453_50001",
"content_in_offer": "notInOffer",
"genre": "Cinema",
"subgenre": "Film Drame",
"channel_name": "CANAL+",
"content_title": "Illusions perdues",
"content_protection": "DRM"
}
},
"detail": {
"informations": {
"type": "VoD",
"contentID": "17230453_50001",
"idRevision": "17230453_50001",
"title": "Illusions perdues",
"URLImage": "https://thumb.canalplus.pro/http/unsafe/{resolutionXY}/filters:quality({imageQualityPercentage})/img-hapi.canalplus.pro:80/ServiceImage/ImageID/107356485",
"URLLogoChannel": "https://thumb.canalplus.pro/http/unsafe/{resolutionXY}/filters:quality({imageQualityPercentage})/img-hapi.canalplus.pro:80/ServiceImage/ImageID/68603655",
"altLogoChannel": "CANAL+",
"summary": "Pendant la Restauration, Lucien de Rubempré, jeune provincial d'Angoulême, se rêve poète. Il débarque à Paris en quête de gloire. Il a le soutien de Louise de Bargeton, une aristocrate qui croit en son talent. Pour gagner sa vie, Lucien trouve un emploi dans le journal dirigé par le peu scrupuleux Etienne Lousteau...",
"isTVoD": false,
"audioLanguage": "VF",
"subtitle": "Film Drame",
"uploadDate": 1671673200000,
"noPub": true,
"editorialTitle": "Film Drame, France, 2021, 2h24",
"sharingURL": "https://mycan.al/cinema/illusions-perdues/h/17230453_50001",
"formats": {
"video": [
"UHD",
"HD"
],
"audio": [
"DOLBY 5.1",
"STEREO"
]
},
"URLVitrine": "https://hodor.canalplus.pro/api/v2/mycanal/highlight/da2291af3b10e9900d1c55e1a65d3388/objectType/unit/17230453_50001.json?previousPageName=myCANAL%20-%20Prog%20-%20Fiche%20-%20Cinema&adult=false&context_page_title=Content%20-%20See%20also%20-%20Illusions%20perdues&omitTracking=true",
"closedCaptioning": true,
"consumptionPlatform": "HAPI",
"trailer": false,
"teasers": [
{
"URLMedias": "https://static.canal-plus.net/ba/17230453_50001.mp4",
"default": true
}
],
"personnalities": [
{
"prefix": "De :",
"personnalitiesList": [
{
"title": "Xavier Giannoli",
"onClick": {
"displayName": "Xavier Giannoli",
"displayTemplate": "contentGrid",
"URLPage": "https://hodor.canalplus.pro/api/v2/mycanal/contentGrid/da2291af3b10e9900d1c55e1a65d3388/12307.json?objectType=person&dsp=detailPage",
"path": "/personne/xavier-giannoli/12307"
}
}
]
},
{
"prefix": "Avec :",
"personnalitiesList": [
{
"title": "Benjamin Voisin",
"onClick": {
"displayName": "Benjamin Voisin",
"displayTemplate": "contentGrid",
"URLPage": "https://hodor.canalplus.pro/api/v2/mycanal/contentGrid/da2291af3b10e9900d1c55e1a65d3388/339366.json?objectType=person&dsp=detailPage",
"path": "/personne/benjamin-voisin/339366"
}
},
{
"title": "Cécile de France",
"onClick": {
"displayName": "Cécile de France",
"displayTemplate": "contentGrid",
"URLPage": "https://hodor.canalplus.pro/api/v2/mycanal/contentGrid/da2291af3b10e9900d1c55e1a65d3388/31634.json?objectType=person&dsp=detailPage",
"path": "/personne/cecile-de-france/31634"
}
},
{
"title": "Vincent Lacoste",
"onClick": {
"displayName": "Vincent Lacoste",
"displayTemplate": "contentGrid",
"URLPage": "https://hodor.canalplus.pro/api/v2/mycanal/contentGrid/da2291af3b10e9900d1c55e1a65d3388/3554.json?objectType=person&dsp=detailPage",
"path": "/personne/vincent-lacoste/3554"
}
},
{
"title": "Xavier Dolan",
"onClick": {
"displayName": "Xavier Dolan",
"displayTemplate": "contentGrid",
"URLPage": "https://hodor.canalplus.pro/api/v2/mycanal/contentGrid/da2291af3b10e9900d1c55e1a65d3388/29821.json?objectType=person&dsp=detailPage",
"path": "/personne/xavier-dolan/29821"
}
},
{
"title": "Gérard Depardieu",
"onClick": {
"displayName": "Gérard Depardieu",
"displayTemplate": "contentGrid",
"URLPage": "https://hodor.canalplus.pro/api/v2/mycanal/contentGrid/da2291af3b10e9900d1c55e1a65d3388/2033.json?objectType=person&dsp=detailPage",
"path": "/personne/gerard-depardieu/2033"
}
},
{
"title": "Salomé Dewaels",
"onClick": {
"displayName": "Salomé Dewaels",
"displayTemplate": "contentGrid",
"URLPage": "https://hodor.canalplus.pro/api/v2/mycanal/contentGrid/da2291af3b10e9900d1c55e1a65d3388/306041.json?objectType=person&dsp=detailPage",
"path": "/personne/salome-dewaels/306041"
}
},
{
"title": "Jeanne Balibar",
"onClick": {
"displayName": "Jeanne Balibar",
"displayTemplate": "contentGrid",
"URLPage": "https://hodor.canalplus.pro/api/v2/mycanal/contentGrid/da2291af3b10e9900d1c55e1a65d3388/2349.json?objectType=person&dsp=detailPage",
"path": "/personne/jeanne-balibar/2349"
}
},
{
"title": "Louis-Do de Lencquesaing",
"onClick": {
"displayName": "Louis-Do de Lencquesaing",
"displayTemplate": "contentGrid",
"URLPage": "https://hodor.canalplus.pro/api/v2/mycanal/contentGrid/da2291af3b10e9900d1c55e1a65d3388/134975.json?objectType=person&dsp=detailPage",
"path": "/personne/louis-do-de-lencquesaing/134975"
}
},
{
"title": "Alexis Barbosa",
"onClick": {
"displayName": "Alexis Barbosa",
"displayTemplate": "contentGrid",
"URLPage": "https://hodor.canalplus.pro/api/v2/mycanal/contentGrid/da2291af3b10e9900d1c55e1a65d3388/553741.json?objectType=person&dsp=detailPage",
"path": "/personne/alexis-barbosa/553741"
}
},
{
"title": "Jean-François Stévenin",
"onClick": {
"displayName": "Jean-François Stévenin",
"displayTemplate": "contentGrid",
"URLPage": "https://hodor.canalplus.pro/api/v2/mycanal/contentGrid/da2291af3b10e9900d1c55e1a65d3388/578.json?objectType=person&dsp=detailPage",
"path": "/personne/jean-francois-stevenin/578"
}
},
{
"title": "André Marcon",
"onClick": {
"displayName": "André Marcon",
"displayTemplate": "contentGrid",
"URLPage": "https://hodor.canalplus.pro/api/v2/mycanal/contentGrid/da2291af3b10e9900d1c55e1a65d3388/3647.json?objectType=person&dsp=detailPage",
"path": "/personne/andre-marcon/3647"
}
},
{
"title": "Marie Cornillon",
"onClick": {
"displayName": "Marie Cornillon",
"displayTemplate": "contentGrid",
"URLPage": "https://hodor.canalplus.pro/api/v2/mycanal/contentGrid/da2291af3b10e9900d1c55e1a65d3388/553722.json?objectType=person&dsp=detailPage",
"path": "/personne/marie-cornillon/553722"
}
}
]
},
{
"prefix": "Scénario :",
"personnalitiesList": [
{
"title": "Xavier Giannoli",
"onClick": {
"displayName": "Xavier Giannoli",
"displayTemplate": "contentGrid",
"URLPage": "https://hodor.canalplus.pro/api/v2/mycanal/contentGrid/da2291af3b10e9900d1c55e1a65d3388/12307.json?objectType=person&dsp=detailPage",
"path": "/personne/xavier-giannoli/12307"
}
}
]
}
],
"reviews": [
{
"name": "Allociné Presse",
"displayRating": true,
"stars": {
"type": "allocine",
"value": 4
}
},
{
"name": "Allociné Spectateur",
"displayRating": true,
"stars": {
"type": "allocine",
"value": 4.5
}
},
{
"name": "Télérama",
"displayRating": true,
"review": "Lascension et la chute du célèbre Lucien de Rubempré, petit poète venu tenter sa chance à Paris. Avec cette adaptation de lœuvre phare de Balzac, Xavier Giannoli signe une fresque flamboyante et cruelle, qui tend un miroir grimaçant à notre époque.",
"stars": {
"type": "telerama",
"value": 3
}
},
{
"name": "Télécâble Sat",
"displayRating": true,
"review": "Récompensée par sept césars, une adaptation aussi somptueuse que moderne du roman de Balzac. L'écriture est ciselée, l'interprétation parfaite, la réalisation affûtée.",
"stars": {
"type": "telecable",
"value": 4
}
}
],
"recommendationTags": [
{
"label": "Adaptations de textes classiques",
"onClick": {
"displayTemplate": "contentGrid",
"displayName": "Adaptations de textes classiques",
"URLPage": "https://hodor.canalplus.pro/api/v2/mycanal/tag/da2291af3b10e9900d1c55e1a65d3388/id/100000014?dsp=detailPage",
"path": "/tag/100000014/adaptations-de-textes-classiques"
}
},
{
"label": "Journalisme",
"onClick": {
"displayTemplate": "contentGrid",
"displayName": "Journalisme",
"URLPage": "https://hodor.canalplus.pro/api/v2/mycanal/tag/da2291af3b10e9900d1c55e1a65d3388/id/100000455?dsp=detailPage",
"path": "/tag/100000455/journalisme"
}
},
{
"label": "Luxe",
"onClick": {
"displayTemplate": "contentGrid",
"displayName": "Luxe",
"URLPage": "https://hodor.canalplus.pro/api/v2/mycanal/tag/da2291af3b10e9900d1c55e1a65d3388/id/100000484?dsp=detailPage",
"path": "/tag/100000484/luxe"
}
},
{
"label": "Réputation",
"onClick": {
"displayTemplate": "contentGrid",
"displayName": "Réputation",
"URLPage": "https://hodor.canalplus.pro/api/v2/mycanal/tag/da2291af3b10e9900d1c55e1a65d3388/id/100000661?dsp=detailPage",
"path": "/tag/100000661/reputation"
}
},
{
"label": "Écrivains",
"onClick": {
"displayTemplate": "contentGrid",
"displayName": "Écrivains",
"URLPage": "https://hodor.canalplus.pro/api/v2/mycanal/tag/da2291af3b10e9900d1c55e1a65d3388/id/100000252?dsp=detailPage",
"path": "/tag/100000252/ecrivains"
}
},
{
"label": "Déceptions amoureuses",
"onClick": {
"displayTemplate": "contentGrid",
"displayName": "Déceptions amoureuses",
"URLPage": "https://hodor.canalplus.pro/api/v2/mycanal/tag/da2291af3b10e9900d1c55e1a65d3388/id/100000211?dsp=detailPage",
"path": "/tag/100000211/deceptions-amoureuses"
}
},
{
"label": "Attirance ou sentiments",
"onClick": {
"displayTemplate": "contentGrid",
"displayName": "Attirance ou sentiments",
"URLPage": "https://hodor.canalplus.pro/api/v2/mycanal/tag/da2291af3b10e9900d1c55e1a65d3388/id/100000077?dsp=detailPage",
"path": "/tag/100000077/attirance-ou-sentiments"
}
},
{
"label": "Subtil",
"onClick": {
"displayTemplate": "contentGrid",
"displayName": "Subtil",
"URLPage": "https://hodor.canalplus.pro/api/v2/mycanal/tag/da2291af3b10e9900d1c55e1a65d3388/id/100000762?dsp=detailPage",
"path": "/tag/100000762/subtil"
}
},
{
"label": "Glamour",
"onClick": {
"displayTemplate": "contentGrid",
"displayName": "Glamour",
"URLPage": "https://hodor.canalplus.pro/api/v2/mycanal/tag/da2291af3b10e9900d1c55e1a65d3388/id/100000364?dsp=detailPage",
"path": "/tag/100000364/glamour"
}
}
],
"parentalRatings": [
{
"value": "2",
"authority": "CSA"
}
],
"duration": "8640000",
"productionYear": "2021",
"contentAvailability": {
"isInCatalog": true,
"isInOffer": false,
"availabilities": {
"download": {
"consumptionPlatform": "HAPI",
"isAvailable": true,
"isInOffer": false,
"URLMedias": "https://hodor.canalplus.pro/api/v2/mycanal/me/getMediaUrl/{tokenCMS}/okapi/17230453_50001.json",
"availabilityEndDate": 1677797940000
},
"stream": {
"consumptionPlatform": "HAPI",
"isAvailable": true,
"isInOffer": false,
"label": "Dispo. jusqu'au 02/03/2023",
"URLMedias": "https://hodor.canalplus.pro/api/v2/mycanal/me/getMediaUrl/{tokenCMS}/okapi/17230453_50001.json"
},
"live": {
"isInOffer": false,
"isAvailable": true
}
}
}
}
},
"perso": [
{
"platform": "HAPI"
}
],
"associatedContents": [
{
"title": "En plus",
"context": {
"contextType": "associatedContent",
"contextDetail": "mycanal-prog-fiche-cinema-illusions_perdues-creplay_chaine_cplus_illusions_perdues-en_plus",
"context_type": "associatedContent",
"context_page_title": "Prog - Fiche - Cinema - Illusions perdues",
"context_list_id": "creplay_chaine_cplus_illusions_perdues",
"context_list_title": "En plus",
"context_list_type": "contentRow",
"context_list_position": 1
},
"contentID": "creplay_chaine_cplus_illusions_perdues",
"contents": [
{
"contentID": "19644697_50001",
"URLImage": "https://thumb.canalplus.pro/http/unsafe/{resolutionXY}/filters:quality({imageQualityPercentage})/img-hapi.canalplus.pro:80/ServiceImage/ImageID/107282238",
"parentalRatings": [
{
"value": "1",
"authority": "CSA"
}
],
"title": "Intro : Illusions perdues",
"subtitle": "Illusions perdues",
"contentAvailability": {
"isInCatalog": true,
"isInOffer": true,
"availabilities": {
"download": {
"consumptionPlatform": "HAPI",
"isAvailable": true,
"isInOffer": false,
"URLMedias": "https://hodor.canalplus.pro/api/v2/mycanal/me/getMediaUrl/{tokenCMS}/okapi/19644697_50001.json",
"availabilityEndDate": 1679785140000
},
"stream": {
"consumptionPlatform": "HAPI",
"isAvailable": true,
"isInOffer": true,
"URLMedias": "https://hodor.canalplus.pro/api/v2/mycanal/me/getMediaUrl/{tokenCMS}/okapi/19644697_50001.json"
},
"live": {
"isInOffer": false,
"isAvailable": false
}
}
}
}
]
}
]
}

View file

@ -4,14 +4,14 @@
<channel lang="fr" xmltv_id="6ter.fr" site_id="521">6TER</channel>
<channel lang="fr" xmltv_id="AB1.fr" site_id="611">AB1</channel>
<channel lang="fr" xmltv_id="Action.fr" site_id="504">ACTION</channel>
<channel lang="fr" xmltv_id="AlJazeeraEnglish.qa" site_id="675">AL JAZEERA ENG</channel>
<channel lang="en" xmltv_id="AlJazeeraEnglish.qa" site_id="675">AL JAZEERA ENG</channel>
<channel lang="fr" xmltv_id="AlticeStudio.fr" site_id="820">ALTICE STUDIO</channel>
<channel lang="fr" xmltv_id="Animaux.fr" site_id="503">ANIMAUX</channel>
<channel lang="fr" xmltv_id="ArirangWorld.kr" site_id="252">ARIRANG TV</channel>
<channel lang="fr" xmltv_id="ARTEFrance.fr" site_id="154">ARTE</channel>
<channel lang="fr" xmltv_id="AstrocenterTV.fr" site_id="632">ASTROCENTER TV</channel>
<channel lang="fr" xmltv_id="Automotolachaine.fr" site_id="612">AUTOMOTO LA CHAINE</channel>
<channel lang="fr" xmltv_id="BBCWorldNewsEurope.uk" site_id="589">BBC WORLD NEWS</channel>
<channel lang="en" xmltv_id="BBCWorldNewsEurope.uk" site_id="589">BBC WORLD NEWS</channel>
<channel lang="fr" xmltv_id="beINSports1France.fr" site_id="381">BEIN SPORTS 1</channel>
<channel lang="fr" xmltv_id="beINSports2France.fr" site_id="384">BEIN SPORTS 2</channel>
<channel lang="fr" xmltv_id="beINSports3France.fr" site_id="516">BEIN SPORTS 3</channel>
@ -59,7 +59,7 @@
<channel lang="fr" xmltv_id="CliqueTV.fr" site_id="665">CLIQUE TV</channel>
<channel lang="fr" xmltv_id="CNBCEurope.uk" site_id="64">CNBC</channel>
<channel lang="fr" xmltv_id="CNews.fr" site_id="480">CNEWS</channel>
<channel lang="fr" xmltv_id="CNNInternationalEurope.us" site_id="30">CNN INT.</channel>
<channel lang="en" xmltv_id="CNNInternationalEurope.us" site_id="30">CNN INT.</channel>
<channel lang="fr" xmltv_id="ColmaxTV.fr" site_id="643">COLMAX TV</channel>
<channel lang="fr" xmltv_id="ComediePlus.fr" site_id="534">COMEDIE+</channel>
<channel lang="fr" xmltv_id="ComedyCentralFrance.fr" site_id="806">COMEDY CENTRAL</channel>
@ -88,7 +88,7 @@
<channel lang="fr" xmltv_id="Eurosport5.fr" site_id="987">EUROSPORT 5</channel>
<channel lang="fr" xmltv_id="FootPlus.fr" site_id="542">FOOT+ 24/24</channel>
<channel lang="fr" xmltv_id="France2.fr" site_id="26">FRANCE 2</channel>
<channel lang="fr" xmltv_id="France24English.fr" site_id="311">FRANCE 24 ENG</channel>
<channel lang="en" xmltv_id="France24English.fr" site_id="311">FRANCE 24 ENG</channel>
<channel lang="fr" xmltv_id="France24French.fr" site_id="310">FRANCE 24</channel>
<channel lang="fr" xmltv_id="France3.fr" site_id="543">FRANCE 3</channel>
<channel lang="fr" xmltv_id="France3Alpes.fr" site_id="926">F3 ALPES</channel>
@ -153,7 +153,7 @@
<channel lang="fr" xmltv_id="MyZenTV.fr" site_id="656">MY ZEN TV</channel>
<channel lang="fr" xmltv_id="NationalGeographicFrance.fr" site_id="302">NATIONAL GEO</channel>
<channel lang="fr" xmltv_id="NationalGeographicWildFrance.fr" site_id="290">NATIONAL GEOGRAPHIC WILD</channel>
<channel lang="fr" xmltv_id="NHKWorldJapan.jp" site_id="654">NHK WORLD-JAPAN</channel>
<channel lang="en" xmltv_id="NHKWorldJapan.jp" site_id="654">NHK WORLD-JAPAN</channel>
<channel lang="fr" xmltv_id="NickelodeonFrance.fr" site_id="591">NICKELODEON</channel>
<channel lang="fr" xmltv_id="NickelodeonJunior.fr" site_id="593">NICKELODEON JUNIOR</channel>
<channel lang="fr" xmltv_id="NickelodeonTeen.fr" site_id="518">NICKELODEON TEEN</channel>

View file

@ -29,6 +29,13 @@ module.exports = {
title: item.title,
description: parseDescription(info),
icon: parseIcon(info),
actors: parseCast(info,"Avec :"),
director: parseCast(info,"De :"),
writer: parseCast(info,"Scénario :"),
composer: parseCast(info,"Musique :"),
presenter: parseCast(info,"Présenté par :"),
date: paseDate(info),
rating: parseRating(info),
start,
stop
})
@ -88,3 +95,34 @@ function parseItems(content) {
return acc
}, [])
}
function parseCast(info, type) {
let people = []
if (info && info.personnalities) {
const personnalities = info.personnalities.find(i => i.prefix == type)
if (!personnalities) return people
for(let person of personnalities.personnalitiesList) {
people.push(person.title)
}
}
return people
}
function paseDate(info) {
return (info && info.productionYear) ? info.productionYear : null
}
function parseRating(info) {
if (!info || !info.parentalRatings) return null
let rating = info.parentalRatings.find(i => i.authority === 'CSA')
if (!rating || Array.isArray(rating)) return null
if (rating.value === '1') return null
if (rating.value === '2') rating.value = '-10'
if (rating.value === '3') rating.value = '-12'
if (rating.value === '4') rating.value = '-16'
if (rating.value === '5') rating.value = '-18'
return {
system: rating.authority,
value: rating.value
}
}

View file

@ -2,56 +2,53 @@
// npx epg-grabber --config=sites/canalplus.com/canalplus.com.config.js --channels=sites/canalplus.com/canalplus.com.channels.xml --output=guide.xml --days=2
const { parser, url } = require('./canalplus.com.config.js')
const fs = require('fs')
const path = require('path')
const axios = require('axios')
const dayjs = require('dayjs')
const utc = require('dayjs/plugin/utc')
const customParseFormat = require('dayjs/plugin/customParseFormat')
dayjs.extend(customParseFormat)
dayjs.extend(utc)
jest.mock('axios')
const date = dayjs.utc('2022-03-07', 'YYYY-MM-DD').startOf('d')
const channel = {
site_id: '312',
xmltv_id: 'TF1.fr'
site_id: '198',
xmltv_id: 'CanalPlusCinemaFrance.fr'
}
jest.mock('axios')
it('can generate valid url for today', () => {
const today = dayjs.utc().startOf('d')
expect(url({ channel, date: today })).toBe(
'https://hodor.canalplus.pro/api/v2/mycanal/channels/da2291af3b10e9900d1c55e1a65d3388/312/broadcasts/day/0'
'https://hodor.canalplus.pro/api/v2/mycanal/channels/da2291af3b10e9900d1c55e1a65d3388/198/broadcasts/day/0'
)
})
it('can generate valid url for tomorrow', () => {
const tomorrow = dayjs.utc().startOf('d').add(1, 'd')
expect(url({ channel, date: tomorrow })).toBe(
'https://hodor.canalplus.pro/api/v2/mycanal/channels/da2291af3b10e9900d1c55e1a65d3388/312/broadcasts/day/1'
'https://hodor.canalplus.pro/api/v2/mycanal/channels/da2291af3b10e9900d1c55e1a65d3388/198/broadcasts/day/1'
)
})
it('can parse response', done => {
const content = `{"timeSlices":[{"timeSlice":"0","contents":[{"contentID":"18257183_50061","title":"TFou","subtitle":"Emission du 07 mars 2022","startTime":1646630700000,"onClick":{"displayTemplate":"detailSeason","displayName":"TFou","path":"/jeunesse/tfou/h/10709960_50061","URLPage":"https://hodor.canalplus.pro/api/v2/mycanal/detail/da2291af3b10e9900d1c55e1a65d3388/okapi/10709339_50061.json?detailType=detailSeason&objectType=season&broadcastID=PLM_1094261940&episodeId=18257183_50061&brandID=10709960_50061&fromDiff=true"}}]},{"timeSlice":"1","contents":[{"contentID":"18257202_50061","title":"Petits plats en équilibre","subtitle":"Mag. Gastronomie","startTime":1646654100000,"onClick":{"displayTemplate":"detailPage","displayName":"Petits plats en équilibre","path":"/divertissement/petits-plats-en-equilibre-mag-gastronomie/h/18257202_50061","URLPage":"https://hodor.canalplus.pro/api/v2/mycanal/detail/da2291af3b10e9900d1c55e1a65d3388/okapi/18257202_50061.json?detailType=detailPage&objectType=unit&broadcastID=PLM_1094380194&fromDiff=true"}}]}]}`
const content = fs.readFileSync(path.resolve(__dirname, '__data__/content.json'))
axios.get.mockImplementation(url => {
if (
url ===
'https://hodor.canalplus.pro/api/v2/mycanal/detail/da2291af3b10e9900d1c55e1a65d3388/okapi/10709339_50061.json?detailType=detailSeason&objectType=season&broadcastID=PLM_1094261940&episodeId=18257183_50061&brandID=10709960_50061&fromDiff=true'
'https://hodor.canalplus.pro/api/v2/mycanal/detail/da2291af3b10e9900d1c55e1a65d3388/okapi/6564630_50001.json?detailType=detailSeason&objectType=season&broadcastID=PLM_1196447642&episodeId=20482220_50001&brandID=4501558_50001&fromDiff=true'
) {
return Promise.resolve({
data: JSON.parse(
`{"detail":{"informations":{"URLImage":"https://thumb.canalplus.pro/http/unsafe/{resolutionXY}/filters:quality({imageQualityPercentage})/img-hapi.canalplus.pro:80/ServiceImage/ImageID/97215037","summary":"Une émission jeunesse qui propose les meilleures séries de dessins animés du moment."}}}`
)
data: JSON.parse(fs.readFileSync(path.resolve(__dirname, '__data__/program1.json')))
})
} else if (
url ===
'https://hodor.canalplus.pro/api/v2/mycanal/detail/da2291af3b10e9900d1c55e1a65d3388/okapi/18257202_50061.json?detailType=detailPage&objectType=unit&broadcastID=PLM_1094380194&fromDiff=true'
'https://hodor.canalplus.pro/api/v2/mycanal/detail/da2291af3b10e9900d1c55e1a65d3388/okapi/17230453_50001.json?detailType=detailPage&objectType=unit&broadcastID=PLM_1196447637&fromDiff=true'
) {
return Promise.resolve({
data: JSON.parse(
`{"detail":{"informations":{"URLImage":"https://thumb.canalplus.pro/http/unsafe/{resolutionXY}/filters:quality({imageQualityPercentage})/img-hapi.canalplus.pro:80/ServiceImage/ImageID/100841894","summary":"Chaque jour, Laurent Mariotte propose des recettes simples et savoureuses pour profiter des ingrédients de saison, en donnant la part belle aux produits locaux."}}}`
)
data: JSON.parse(fs.readFileSync(path.resolve(__dirname, '__data__/program2.json')))
})
} else {
return Promise.resolve({ data: '' })
@ -68,20 +65,43 @@ it('can parse response', done => {
expect(result).toMatchObject([
{
start: '2022-03-07T05:25:00.000Z',
stop: '2022-03-07T11:55:00.000Z',
title: 'TFou',
description:
'Une émission jeunesse qui propose les meilleures séries de dessins animés du moment.',
icon: 'https://thumb.canalplus.pro/http/unsafe/{resolutionXY}/filters:quality({imageQualityPercentage})/img-hapi.canalplus.pro:80/ServiceImage/ImageID/97215037'
start: '2023-01-12T06:28:00.000Z',
stop: '2023-01-12T12:06:00.000Z',
title: 'Le cercle',
description: `Tant qu'il y aura du cinéma, LE CERCLE sera là. C'est la seule émission télévisée de débats critiques 100% consacrée au cinéma et elle rentre dans sa 18e saison. Chaque semaine, elle offre des joutes enflammées, joyeuses et sans condescendance, sur les films à l'affiche ; et invite avec \"Le questionnaire du CERCLE\" les réalisatrices et réalisateurs à venir partager leur passion cinéphile.`,
icon: 'https://thumb.canalplus.pro/http/unsafe/{resolutionXY}/filters:quality({imageQualityPercentage})/img-hapi.canalplus.pro:80/ServiceImage/ImageID/107297573',
presenter: ['Lily Bloom'],
rating: {
system: 'CSA',
value: '-10'
}
},
{
start: '2022-03-07T11:55:00.000Z',
stop: '2022-03-07T12:55:00.000Z',
title: 'Petits plats en équilibre',
description:
'Chaque jour, Laurent Mariotte propose des recettes simples et savoureuses pour profiter des ingrédients de saison, en donnant la part belle aux produits locaux.',
icon: 'https://thumb.canalplus.pro/http/unsafe/{resolutionXY}/filters:quality({imageQualityPercentage})/img-hapi.canalplus.pro:80/ServiceImage/ImageID/100841894'
start: '2023-01-12T12:06:00.000Z',
stop: '2023-01-12T13:06:00.000Z',
title: 'Illusions perdues',
description: `Pendant la Restauration, Lucien de Rubempré, jeune provincial d'Angoulême, se rêve poète. Il débarque à Paris en quête de gloire. Il a le soutien de Louise de Bargeton, une aristocrate qui croit en son talent. Pour gagner sa vie, Lucien trouve un emploi dans le journal dirigé par le peu scrupuleux Etienne Lousteau...`,
icon: 'https://thumb.canalplus.pro/http/unsafe/{resolutionXY}/filters:quality({imageQualityPercentage})/img-hapi.canalplus.pro:80/ServiceImage/ImageID/107356485',
director: ['Xavier Giannoli'],
actors: [
'Benjamin Voisin',
'Cécile de France',
'Vincent Lacoste',
'Xavier Dolan',
'Gérard Depardieu',
'Salomé Dewaels',
'Jeanne Balibar',
'Louis-Do de Lencquesaing',
'Alexis Barbosa',
'Jean-François Stévenin',
'André Marcon',
'Marie Cornillon'
],
writer: ['Xavier Giannoli'],
rating: {
system: 'CSA',
value: '-10'
}
}
])
done()
@ -89,13 +109,8 @@ it('can parse response', done => {
.catch(done)
})
it('can handle empty guide', done => {
parser({
content: `{"currentPage":{"displayTemplate":"error","displayName":"Page introuvable","path":"/erreur","BOName":"Page introuvable","BOLayoutName":"Erreur 404"},"title":"Page introuvable","text":"La page que vous demandez est introuvable. Si le problème persiste, vous pouvez contacter l'assistance de CANAL+.","code":404}`
})
.then(result => {
it('can handle empty guide', async () => {
const content = fs.readFileSync(path.resolve(__dirname, '__data__/no_content.json'))
const result = await parser({ content })
expect(result).toMatchObject([])
done()
})
.catch(done)
})