mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-09 08:30:06 -04:00
Merge pull request #1893 from iptv-org/add-nos.pt
Add guide from nos.pt
This commit is contained in:
commit
2a152ab746
8 changed files with 7688 additions and 0 deletions
17
.github/workflows/nos.pt.yml
vendored
Normal file
17
.github/workflows/nos.pt.yml
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
name: nos.pt
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 3 * * *'
|
||||
workflow_dispatch:
|
||||
workflow_run:
|
||||
workflows: [_trigger]
|
||||
types:
|
||||
- completed
|
||||
jobs:
|
||||
load:
|
||||
uses: ./.github/workflows/_load.yml
|
||||
with:
|
||||
site: ${{github.workflow}}
|
||||
secrets:
|
||||
APP_ID: ${{ secrets.APP_ID }}
|
||||
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
|
4224
sites/nos.pt/__data__/content.html
Normal file
4224
sites/nos.pt/__data__/content.html
Normal file
File diff suppressed because one or more lines are too long
2988
sites/nos.pt/__data__/no_content.html
Normal file
2988
sites/nos.pt/__data__/no_content.html
Normal file
File diff suppressed because one or more lines are too long
1
sites/nos.pt/__data__/program_0.json
Normal file
1
sites/nos.pt/__data__/program_0.json
Normal file
|
@ -0,0 +1 @@
|
|||
{"d":"Anatomia de Grey T.17 Ep.3_#|$_Os médicos do Grey Sloan continuam a enfrentar a nova realidade do COVID-19 e lidam com um paciente conhecido e teimoso. Koracick fica encarregue dos internos e Link opera um terapeuta sexual._#|$_b6fd27f4bd0b404abd4c3fc4faa79024_resized_352x198.jpg_#|$_undefined_#|$_undefined_#|$_RTP 1_#|$_2023-01-27T23:50:00+00:00_#|$_2023-01-28T00:36:00+00:00_#|$_false"}
|
1
sites/nos.pt/__data__/program_21.json
Normal file
1
sites/nos.pt/__data__/program_21.json
Normal file
|
@ -0,0 +1 @@
|
|||
{"d":"MasterChef Portugal T.1 Ep.10_#|$_A maior competição de cozinha do mundo arranca ao comando de três dos mais conceituados chefs portugueses: Pedro Pena Bastos, Noélia Jerónimo e Ricardo Costa, que nos vão transmitir os seus conhecimentos e a sua paixão pela cozinha._#|$_8aa511d697f0401a88a0cb1ec2718cc3_resized_352x198.jpg_#|$_undefined_#|$_undefined_#|$_RTP 1_#|$_2023-01-28T21:38:00+00:00_#|$_2023-01-29T00:05:00+00:00_#|$_false"}
|
209
sites/nos.pt/nos.pt.channels.xml
Normal file
209
sites/nos.pt/nos.pt.channels.xml
Normal file
|
@ -0,0 +1,209 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<site site="nos.pt">
|
||||
<channels>
|
||||
<channel lang="pt" xmltv_id="1Plus1International.ua" site_id="24">1+1</channel>
|
||||
<channel lang="pt" xmltv_id="24KitchenPortugal.pt" site_id="243">24Kitchen HD</channel>
|
||||
<channel lang="pt" xmltv_id="3sat.de" site_id="676">3SAT</channel>
|
||||
<channel lang="pt" xmltv_id="AfroMusicChannel.pt" site_id="272">Afro Music Channel</channel>
|
||||
<channel lang="pt" xmltv_id="AMCCrimePortugal.pt" site_id="411">AMC Crime</channel>
|
||||
<channel lang="pt" xmltv_id="AMCPortugal.pt" site_id="436">AMC</channel>
|
||||
<channel lang="pt" xmltv_id="ARTV.pt" site_id="49">ARTV</channel>
|
||||
<channel lang="pt" xmltv_id="AXNMovies.pt" site_id="164">AXN Movies</channel>
|
||||
<channel lang="pt" xmltv_id="AXNPortugal.pt" site_id="77">AXN</channel>
|
||||
<channel lang="pt" xmltv_id="BabyTV.uk" site_id="448">Baby TV</channel>
|
||||
<channel lang="pt" xmltv_id="Biggs.pt" site_id="176">Biggs</channel>
|
||||
<channel lang="pt" xmltv_id="BloombergTVEurope.uk" site_id="44">Bloomberg</channel>
|
||||
<channel lang="pt" xmltv_id="BVN.nl" site_id="28">BVN</channel>
|
||||
<channel lang="pt" xmltv_id="Canal11.pt" site_id="565">Canal 11 HD</channel>
|
||||
<channel lang="pt" xmltv_id="CanalHollywoodPortugal.pt" site_id="13">Canal Hollywood</channel>
|
||||
<channel lang="pt" xmltv_id="CanalNos.pt" site_id="408">Canal NOS HD</channel>
|
||||
<channel lang="pt" xmltv_id="CanalPandaPortugal.pt" site_id="31">Canal Panda</channel>
|
||||
<channel lang="pt" xmltv_id="CanalQ.pt" site_id="235">Canal Q</channel>
|
||||
<channel lang="pt" xmltv_id="CartoonNetworkPortugal.pt" site_id="252">Cartoon Network HD</channel>
|
||||
<channel lang="pt" xmltv_id="CasaeCozinha.pt" site_id="572">Casa e Cozinha HD</channel>
|
||||
<channel lang="pt" xmltv_id="CCTV4Europe.cn" site_id="316">CCTV 4</channel>
|
||||
<channel lang="pt" xmltv_id="CGTNEurope.cn" site_id="312">CGTN</channel>
|
||||
<channel lang="pt" xmltv_id="CMTV.pt" site_id="381">CMTV</channel>
|
||||
<channel lang="pt" xmltv_id="CNBCEurope.uk" site_id="52">CNBC</channel>
|
||||
<channel lang="pt" xmltv_id="CNNPortugal.pt" site_id="160">CNN Portugal</channel>
|
||||
<channel lang="pt" xmltv_id="CubavisionInternacional.cu" site_id="121">Cubavisión Internacional</channel>
|
||||
<channel lang="pt" xmltv_id="DiscoveryChannelPortugal.pt" site_id="22">Discovery Channel</channel>
|
||||
<channel lang="pt" xmltv_id="DisneyChannelPortugal.pt" site_id="594">Disney Channel HD</channel>
|
||||
<channel lang="pt" xmltv_id="DisneyJuniorPortugal.pt" site_id="226">Disney Junior</channel>
|
||||
<channel lang="pt" xmltv_id="DogTV.us" site_id="371">DOGTV</channel>
|
||||
<channel lang="pt" xmltv_id="DWDeutsch.de" site_id="541">DW (Alemão)</channel>
|
||||
<channel lang="pt" xmltv_id="DWEnglish.de" site_id="115">DW</channel>
|
||||
<channel lang="pt" xmltv_id="ElevenSports1Portugal.pt" site_id="518">ELEVEN SPORTS 1</channel>
|
||||
<channel lang="pt" xmltv_id="ElevenSports2Portugal.pt" site_id="519">ELEVEN SPORTS 2</channel>
|
||||
<channel lang="pt" xmltv_id="ElevenSports3Portugal.pt" site_id="513">ELEVEN SPORTS 3</channel>
|
||||
<channel lang="pt" xmltv_id="ElevenSports4Portugal.pt" site_id="514">ELEVEN SPORTS 4</channel>
|
||||
<channel lang="pt" xmltv_id="ElevenSports5Portugal.pt" site_id="515">ELEVEN SPORTS 5</channel>
|
||||
<channel lang="pt" xmltv_id="ElevenSports6Portugal.pt" site_id="516">ELEVEN SPORTS 6</channel>
|
||||
<channel lang="pt" xmltv_id="EuronewsPortuguese.fr" site_id="25">Euronews</channel>
|
||||
<channel lang="pt" xmltv_id="FightNetwork.ca" site_id="236">Fight Network HD</channel>
|
||||
<channel lang="pt" xmltv_id="FoodNetworkEMEA.us" site_id="62">Food Network HD</channel>
|
||||
<channel lang="pt" xmltv_id="FoxComedyPortugal.pt" site_id="116">FOX Comedy</channel>
|
||||
<channel lang="pt" xmltv_id="FoxCrimePortugal.pt" site_id="114">FOX Crime</channel>
|
||||
<channel lang="pt" xmltv_id="FoxLifePortugal.pt" site_id="86">FOX Life</channel>
|
||||
<channel lang="pt" xmltv_id="FoxMoviesPortugal.pt" site_id="177">FOX Movies</channel>
|
||||
<channel lang="pt" xmltv_id="FoxPortugal.pt" site_id="85">FOX</channel>
|
||||
<channel lang="pt" xmltv_id="France24English.fr" site_id="109">France 24 (I)</channel>
|
||||
<channel lang="pt" xmltv_id="France24French.fr" site_id="132">France 24 (F)</channel>
|
||||
<channel lang="pt" xmltv_id="FUELTV.at" site_id="78">Fuel TV</channel>
|
||||
<channel lang="pt" xmltv_id="GaliciaTVEuropa.es" site_id="54">TV Galicia</channel>
|
||||
<channel lang="pt" xmltv_id="GloboNow.pt" site_id="111">Globo Now HD</channel>
|
||||
<channel lang="pt" xmltv_id="GloboPortugal.pt" site_id="230">Globo</channel>
|
||||
<channel lang="pt" xmltv_id="HistoriaPortugal.pt" site_id="19">Canal História</channel>
|
||||
<channel lang="pt" xmltv_id="HorseTV.it" site_id="680">Horse TV</channel>
|
||||
<channel lang="pt" xmltv_id="HotMan.pt" site_id="672">HOT Man</channel>
|
||||
<channel lang="pt" xmltv_id="HotTaboo.pt" site_id="671">HOT Taboo</channel>
|
||||
<channel lang="pt" xmltv_id="HOTTV.pt" site_id="171">HOT</channel>
|
||||
<channel lang="pt" xmltv_id="InvestigationDiscoveryEurope.us" site_id="530">ID Investigation Discovery</channel>
|
||||
<channel lang="pt" xmltv_id="KBSWorld.kr" site_id="234">KBS World HD</channel>
|
||||
<channel lang="pt" xmltv_id="KIKA.de" site_id="677">KiKa</channel>
|
||||
<channel lang="pt" xmltv_id="KuriakosTV.pt" site_id="426">Kuriakos TV</channel>
|
||||
<channel lang="pt" xmltv_id="LocalVisaoTV.pt" site_id="229">Localvisão TV HD</channel>
|
||||
<channel lang="pt" xmltv_id="M6.fr" site_id="37">M6</channel>
|
||||
<channel lang="pt" xmltv_id="MCMPop.fr" site_id="368">MCM Pop</channel>
|
||||
<channel lang="pt" xmltv_id="MCMTop.fr" site_id="34">MCM Top</channel>
|
||||
<channel lang="pt" xmltv_id="Mezzo.fr" site_id="50">Mezzo</channel>
|
||||
<channel lang="pt" xmltv_id="MezzoLiveHD.fr" site_id="356">Mezzo Live HD</channel>
|
||||
<channel lang="pt" xmltv_id="MotorvisionTV.de" site_id="354">Motorvision HD</channel>
|
||||
<channel lang="pt" xmltv_id="MTV00s.uk" site_id="35">MTV 00s</channel>
|
||||
<channel lang="pt" xmltv_id="MTVLive.uk" site_id="560">MTV Live</channel>
|
||||
<channel lang="pt" xmltv_id="MTVPortugal.pt" site_id="36">MTV Portugal</channel>
|
||||
<channel lang="pt" xmltv_id="MyZenTV.fr" site_id="167">MyZen TV</channel>
|
||||
<channel lang="pt" xmltv_id="NationalGeographicPortugal.pt" site_id="59">National Geographic</channel>
|
||||
<channel lang="pt" xmltv_id="NationalGeographicWildPortugal.pt" site_id="82">National Geographic WILD</channel>
|
||||
<channel lang="pt" xmltv_id="NauticalChannel.it" site_id="679">Nautical Channel</channel>
|
||||
<channel lang="pt" xmltv_id="NHKWorldJapan.jp" site_id="46">NHK World TV</channel>
|
||||
<channel lang="pt" xmltv_id="NickelodeonPortugal.pt" site_id="94">Nickelodeon</channel>
|
||||
<channel lang="pt" xmltv_id="NickJrPortugal.pt" site_id="444">Nick Jr.</channel>
|
||||
<channel lang="pt" xmltv_id="NickelodeonUkrainePlutoTV.ua" site_id="681">Nickelodeon Ukraine Pluto TV</channel>
|
||||
<channel lang="pt" xmltv_id="NosStudios.pt" site_id="546">NOS Studios</channel>
|
||||
<channel lang="pt" xmltv_id="Odisseia.pt" site_id="20">Odisseia</channel>
|
||||
<channel lang="pt" xmltv_id="PandaKids.pt" site_id="597">Panda KIDS</channel>
|
||||
<channel lang="pt" xmltv_id="PhoenixCNEChannel.hk" site_id="119">Phoenix CNE</channel>
|
||||
<channel lang="pt" xmltv_id="PhoenixInfoNewsChannel.hk" site_id="120">Phoenix Infonews</channel>
|
||||
<channel lang="pt" xmltv_id="PortoCanal.pt" site_id="105">Porto Canal</channel>
|
||||
<channel lang="pt" xmltv_id="ProSieben.de" site_id="503">ProSieben</channel>
|
||||
<channel lang="pt" xmltv_id="RecordNews.br" site_id="30">Record News</channel>
|
||||
<channel lang="pt" xmltv_id="RT.ru" site_id="165">Russia Today</channel>
|
||||
<channel lang="pt" xmltv_id="RTP1.pt" site_id="5">RTP 1</channel>
|
||||
<channel lang="pt" xmltv_id="RTP2.pt" site_id="3">RTP 2</channel>
|
||||
<channel lang="pt" xmltv_id="RTP3.pt" site_id="64">RTP 3</channel>
|
||||
<channel lang="pt" xmltv_id="RTPMadeira.pt" site_id="107">RTP Madeira</channel>
|
||||
<channel lang="pt" xmltv_id="RTPMemoria.pt" site_id="80">RTP Memória</channel>
|
||||
<channel lang="pt" xmltv_id="RTRPlanetaEurope.ru" site_id="117">RTR Planeta</channel>
|
||||
<channel lang="pt" xmltv_id="SAT1.de" site_id="501">SAT 1</channel>
|
||||
<channel lang="pt" xmltv_id="Sextreme.br" site_id="364">Sextreme</channel>
|
||||
<channel lang="pt" xmltv_id="SIC.pt" site_id="7">SIC</channel>
|
||||
<channel lang="pt" xmltv_id="SICCaras.pt" site_id="251">SIC Caras</channel>
|
||||
<channel lang="pt" xmltv_id="SICK.pt" site_id="552">SIC K</channel>
|
||||
<channel lang="pt" xmltv_id="SICMulher.pt" site_id="71">SIC Mulher</channel>
|
||||
<channel lang="pt" xmltv_id="SICNoticias.pt" site_id="9">SIC Notícias</channel>
|
||||
<channel lang="pt" xmltv_id="SICRadical.pt" site_id="61">SIC Radical</channel>
|
||||
<channel lang="pt" xmltv_id="SPlus.pt" site_id="510">S+ HD</channel>
|
||||
<channel lang="pt" xmltv_id="SportingTV.pt" site_id="351">Sporting TV</channel>
|
||||
<channel lang="pt" xmltv_id="SportTV1.pt" site_id="17">SPORT TV1</channel>
|
||||
<channel lang="pt" xmltv_id="SportTV2.pt" site_id="95">SPORT TV2</channel>
|
||||
<channel lang="pt" xmltv_id="SportTV3.pt" site_id="136">SPORT TV3</channel>
|
||||
<channel lang="pt" xmltv_id="SportTV4.pt" site_id="246">SPORT TV4</channel>
|
||||
<channel lang="pt" xmltv_id="SportTV5.pt" site_id="179">SPORT TV5</channel>
|
||||
<channel lang="pt" xmltv_id="SportTV6.pt" site_id="610">Sport TV 6 HD</channel>
|
||||
<channel lang="pt" xmltv_id="SportTVPlus.pt" site_id="416">SPORT TV+</channel>
|
||||
<channel lang="pt" xmltv_id="StingrayiConcerts.ca" site_id="42">Stingray iConcerts HD</channel>
|
||||
<channel lang="pt" xmltv_id="SuperRTL.de" site_id="200">Super RTL</channel>
|
||||
<channel lang="pt" xmltv_id="SyfyPortugal.pt" site_id="542">SYFY</channel>
|
||||
<channel lang="pt" xmltv_id="TCVInternacional.cv" site_id="237">TCV Internacional</channel>
|
||||
<channel lang="pt" xmltv_id="TPAInternacional.ao" site_id="138">TPA Internacional</channel>
|
||||
<channel lang="pt" xmltv_id="TraceToca.fr" site_id="543">Trace Toca</channel>
|
||||
<channel lang="pt" xmltv_id="TraceUrban.fr" site_id="65">Trace Urban HD</channel>
|
||||
<channel lang="pt" xmltv_id="TravelChannelEMEA.uk" site_id="100">Travel Channel</channel>
|
||||
<channel lang="pt" xmltv_id="TV5MondeEurope.fr" site_id="53">TV5 Monde</channel>
|
||||
<channel lang="pt" xmltv_id="TVCineAction.pt" site_id="84">TVCine ACTION</channel>
|
||||
<channel lang="pt" xmltv_id="TVCineEdition.pt" site_id="18">TVCine EDITION</channel>
|
||||
<channel lang="pt" xmltv_id="TVCineEmotion.pt" site_id="76">TVCine EMOTION</channel>
|
||||
<channel lang="pt" xmltv_id="TVCineTop.pt" site_id="16">TVCine TOP</channel>
|
||||
<channel lang="pt" xmltv_id="TVEInternacionalEuropeAsia.es" site_id="48">TVEi</channel>
|
||||
<channel lang="pt" xmltv_id="TVI.pt" site_id="8">TVI</channel>
|
||||
<channel lang="pt" xmltv_id="TVIFiccao.pt" site_id="574">TVI Ficção HD</channel>
|
||||
<channel lang="pt" xmltv_id="TVIReality.pt" site_id="382">TVI Reality</channel>
|
||||
<channel lang="pt" xmltv_id="TVRInternational.ro" site_id="123">TVR Internacional</channel>
|
||||
<channel lang="pt" xmltv_id="Venus.ar" site_id="393">Venus</channel>
|
||||
<channel lang="pt" xmltv_id="ZapViva.ao" site_id="538">ZAP Viva HD</channel>
|
||||
<channel lang="pt" xmltv_id="ZDF.de" site_id="504">ZDF</channel>
|
||||
<channel lang="pt" xmltv_id="ZDFneo.de" site_id="690">ZDF Neo</channel>
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="10">Eurosport 1</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="101">Record TV</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="106">RTP Açores</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="108">Al Jazeera</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="112">PFC</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="124">BNT World</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="128">Eurosport 2</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="129">Caça e Pesca</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="130">E! Entertainment</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="139">RTP 1 HD</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="142">Canção Nova</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="143">MAX</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="144">SET Asia</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="145">Eurosport 1 HD</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="161">AXN HD</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="163">AXN White</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="172">TVE 24h</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="174">FOX HD</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="175">FOX Life HD</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="181">Toros TV HD</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="193">ACOLH</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="201">Syfy HD</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="202">E! Entertainment HD</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="222">HOT HD</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="23">TLC</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="245">BTV1 HD</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="249">BTV1</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="26">CNN</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="27">RTP África</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="33">TeleSUR</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="343">STV Notícias</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="349">Canal de Teste</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="350">Record TV HD</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="365">Penthouse HD1</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="39">Sky News</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="395">Ativação NOS</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="40">RTL</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="41">ARTE</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="415">AMC HD</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="417">SPORT TV+ HD</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="418">SIC HD</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="419">SIC Notícias HD</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="425">CMTV HD</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="447">Globo HD</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="449">Sport TV NBA</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="47">FTV HD</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="502">ARD</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="505">VIVA Germany</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="506">DSF</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="509">AMC Break HD</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="51">FTV</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="55">Rai Italia</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="553">SIC K HD</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="554">RTP 2 HD</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="555">TVI HD</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="556">RTP 3 HD</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="563">Eurosport 2 HD</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="566">Canal 11 HD</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="57">Zee TV</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="571">AzoresTV by VITEC – TESTE</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="58">Canal 180</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="588">Canal Galeria</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="592">RTP Açores HD</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="600">Canal Galeria</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="678">RTP Memória</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="683">Em Destaque</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="689">Unifé TV</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="69">Playboy HD</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="70">Travel Channel HD</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="75">AXN White HD</channel> -->
|
||||
<!-- <channel lang="pt" xmltv_id="" site_id="81">AMC Break</channel> -->
|
||||
</channels>
|
||||
</site>
|
148
sites/nos.pt/nos.pt.config.js
Normal file
148
sites/nos.pt/nos.pt.config.js
Normal file
|
@ -0,0 +1,148 @@
|
|||
const axios = require('axios')
|
||||
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: 'nos.pt',
|
||||
days: 2,
|
||||
url({ channel }) {
|
||||
return `https://www.nos.pt/particulares/televisao/guia-tv/Pages/channel.aspx?channel=${channel.site_id}`
|
||||
},
|
||||
async parser({ content, date }) {
|
||||
const programs = []
|
||||
const items = parseItems(content, date)
|
||||
date = date.subtract(1, 'd')
|
||||
for (let item of items) {
|
||||
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
|
||||
}
|
||||
let stop = parseStop($item, date)
|
||||
if (stop.isBefore(start)) {
|
||||
stop = stop.add(1, 'd')
|
||||
date = date.add(1, 'd')
|
||||
}
|
||||
const channelAcronym = parseChannelAcronym(content)
|
||||
const programId = parseProgramId($item)
|
||||
const details = await loadProgramDetails(channelAcronym, programId)
|
||||
programs.push({
|
||||
title: parseTitle($item),
|
||||
description: details.description,
|
||||
icon: details.icon,
|
||||
start,
|
||||
stop
|
||||
})
|
||||
}
|
||||
|
||||
return programs
|
||||
},
|
||||
async channels({ country }) {
|
||||
const html = await axios
|
||||
.get(`https://www.nos.pt/particulares/televisao/guia-tv/Pages/default.aspx`)
|
||||
.then(r => r.data)
|
||||
.catch(console.log)
|
||||
|
||||
const $ = cheerio.load(html)
|
||||
const items = $('#guide-filters > dl.dropdown-ord > dd > ul > li').toArray()
|
||||
|
||||
return items.map(item => {
|
||||
const $item = cheerio.load(item)
|
||||
|
||||
return {
|
||||
lang: 'pt',
|
||||
site_id: $item('.value').text().trim(),
|
||||
name: $item('a').clone().children().remove().end().text().trim()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
async function loadProgramDetails(channelAcronym, programId) {
|
||||
if (!channelAcronym || !programId) return {}
|
||||
const data = await axios
|
||||
.post(
|
||||
`https://www.nos.pt/_layouts/15/Armstrong/ApplicationPages/EPGGetProgramsAndDetails.aspx/GetProgramDetails`,
|
||||
{
|
||||
programId,
|
||||
channelAcronym,
|
||||
hour: 'undefined',
|
||||
startHour: 'undefined',
|
||||
endHour: 'undefined'
|
||||
},
|
||||
{
|
||||
headers: {
|
||||
'content-type': 'application/json; charset=UTF-8'
|
||||
}
|
||||
}
|
||||
)
|
||||
.then(r => r.data)
|
||||
.catch(console.log)
|
||||
|
||||
if (!data) return {}
|
||||
|
||||
const [, description, iconFilename] = data.d.split('_#|$_')
|
||||
const icon = iconFilename ? `https://images.nos.pt/${iconFilename}` : null
|
||||
|
||||
return {
|
||||
description,
|
||||
icon
|
||||
}
|
||||
}
|
||||
|
||||
function parseProgramId($item) {
|
||||
return $item('a').attr('id')
|
||||
}
|
||||
|
||||
function parseChannelAcronym(content) {
|
||||
const $ = cheerio.load(content)
|
||||
|
||||
return $('#channel-logo > img').attr('alt')
|
||||
}
|
||||
|
||||
function parseTitle($item) {
|
||||
return $item('a').attr('title').trim()
|
||||
}
|
||||
|
||||
function parseStart($item, date) {
|
||||
const [time] = $item('.duration')
|
||||
.text()
|
||||
.replace(/\s+/g, ' ')
|
||||
.trim()
|
||||
.match(/^\d{2}:\d{2}/) || [null]
|
||||
|
||||
if (!time) return null
|
||||
|
||||
return dayjs.tz(`${date.format('YYYY-MM-DD')} ${time}`, 'YYYY-MM-DD HH:mm', 'Europe/Lisbon')
|
||||
}
|
||||
|
||||
function parseStop($item, date) {
|
||||
const [time] = $item('.duration')
|
||||
.text()
|
||||
.replace(/\s+/g, ' ')
|
||||
.trim()
|
||||
.match(/\d{2}:\d{2}$/) || [null]
|
||||
|
||||
if (!time) return null
|
||||
|
||||
return dayjs.tz(`${date.format('YYYY-MM-DD')} ${time}`, 'YYYY-MM-DD HH:mm', 'Europe/Lisbon')
|
||||
}
|
||||
|
||||
function parseItems(content, date) {
|
||||
const day = date.date()
|
||||
const $ = cheerio.load(content)
|
||||
|
||||
return $(`#day${day} > ul > li`).toArray()
|
||||
}
|
100
sites/nos.pt/nos.pt.test.js
Normal file
100
sites/nos.pt/nos.pt.test.js
Normal file
|
@ -0,0 +1,100 @@
|
|||
// npm run channels:parse -- --config=./sites/nos.pt/nos.pt.config.js --output=./sites/nos.pt/nos.pt.channels.xml
|
||||
// npx epg-grabber --config=sites/nos.pt/nos.pt.config.js --channels=sites/nos.pt/nos.pt.channels.xml --output=guide.xml --days=2
|
||||
|
||||
const { parser, url } = require('./nos.pt.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('2023-01-28', 'YYYY-MM-DD').startOf('d')
|
||||
const channel = {
|
||||
site_id: '5',
|
||||
xmltv_id: 'RTP1.pt'
|
||||
}
|
||||
|
||||
it('can generate valid url', () => {
|
||||
expect(url({ channel })).toBe(
|
||||
'https://www.nos.pt/particulares/televisao/guia-tv/Pages/channel.aspx?channel=5'
|
||||
)
|
||||
})
|
||||
|
||||
it('can parse response', async () => {
|
||||
const content = fs.readFileSync(path.resolve(__dirname, '__data__/content.html'), 'utf8')
|
||||
|
||||
axios.post.mockImplementation((url, data) => {
|
||||
if (
|
||||
url ===
|
||||
'https://www.nos.pt/_layouts/15/Armstrong/ApplicationPages/EPGGetProgramsAndDetails.aspx/GetProgramDetails' &&
|
||||
JSON.stringify(data) ===
|
||||
JSON.stringify({
|
||||
programId: '81361',
|
||||
channelAcronym: 'RTP1',
|
||||
hour: 'undefined',
|
||||
startHour: 'undefined',
|
||||
endHour: 'undefined'
|
||||
})
|
||||
) {
|
||||
return Promise.resolve({
|
||||
data: JSON.parse(fs.readFileSync(path.resolve(__dirname, '__data__/program_0.json')))
|
||||
})
|
||||
} else if (
|
||||
url ===
|
||||
'https://www.nos.pt/_layouts/15/Armstrong/ApplicationPages/EPGGetProgramsAndDetails.aspx/GetProgramDetails' &&
|
||||
JSON.stringify(data) ===
|
||||
JSON.stringify({
|
||||
programId: '81382',
|
||||
channelAcronym: 'RTP1',
|
||||
hour: 'undefined',
|
||||
startHour: 'undefined',
|
||||
endHour: 'undefined'
|
||||
})
|
||||
) {
|
||||
return Promise.resolve({
|
||||
data: JSON.parse(fs.readFileSync(path.resolve(__dirname, '__data__/program_21.json')))
|
||||
})
|
||||
} else {
|
||||
return Promise.resolve({ data: '' })
|
||||
}
|
||||
})
|
||||
|
||||
let results = await parser({ content, date })
|
||||
results = results.map(p => {
|
||||
p.start = p.start.toJSON()
|
||||
p.stop = p.stop.toJSON()
|
||||
return p
|
||||
})
|
||||
|
||||
expect(results[0]).toMatchObject({
|
||||
start: '2023-01-27T23:50:00.000Z',
|
||||
stop: '2023-01-28T00:36:00.000Z',
|
||||
title: `Anatomia de Grey T.17 Ep.3`,
|
||||
description:
|
||||
'Os médicos do Grey Sloan continuam a enfrentar a nova realidade do COVID-19 e lidam com um paciente conhecido e teimoso. Koracick fica encarregue dos internos e Link opera um terapeuta sexual.',
|
||||
icon: 'https://images.nos.pt/b6fd27f4bd0b404abd4c3fc4faa79024_resized_352x198.jpg'
|
||||
})
|
||||
|
||||
expect(results[21]).toMatchObject({
|
||||
start: '2023-01-28T21:38:00.000Z',
|
||||
stop: '2023-01-29T00:05:00.000Z',
|
||||
title: `MasterChef Portugal T.1 Ep.10`,
|
||||
description:
|
||||
'A maior competição de cozinha do mundo arranca ao comando de três dos mais conceituados chefs portugueses: Pedro Pena Bastos, Noélia Jerónimo e Ricardo Costa, que nos vão transmitir os seus conhecimentos e a sua paixão pela cozinha.',
|
||||
icon: 'https://images.nos.pt/8aa511d697f0401a88a0cb1ec2718cc3_resized_352x198.jpg'
|
||||
})
|
||||
})
|
||||
|
||||
it('can handle empty guide', async () => {
|
||||
const results = await parser({
|
||||
date,
|
||||
content: fs.readFileSync(path.resolve(__dirname, '__data__/no_content.html'), 'utf8')
|
||||
})
|
||||
|
||||
expect(results).toMatchObject([])
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue