From 4545075ba34107c0752b44f0b87ef79e6afa8eb4 Mon Sep 17 00:00:00 2001 From: mac12m99 <10120390+mac12m99@users.noreply.github.com> Date: Sun, 18 Apr 2021 14:11:29 +0200 Subject: [PATCH] Fix paramount e tunein --- channels/cineblog01.py | 9 +++++---- channels/paramount.py | 5 ++++- channels/tunein.py | 2 +- core/scrapertools.py | 2 +- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/channels/cineblog01.py b/channels/cineblog01.py index 917ee877..41524176 100644 --- a/channels/cineblog01.py +++ b/channels/cineblog01.py @@ -2,7 +2,7 @@ # ------------------------------------------------------------ # Canale per cineblog01 # ------------------------------------------------------------ - +import datetime import re from core import scrapertools, httptools, servertools, support @@ -91,11 +91,12 @@ def search(item, text): @support.scrape def peliculas(item): # esclusione degli articoli 'di servizio' + curYear = datetime.date.today().year blacklist = ['BENVENUTI', 'Richieste Serie TV', 'CB01.UNO ▶ TROVA L’INDIRIZZO UFFICIALE ', - 'Aggiornamento Quotidiano Serie TV', 'OSCAR 2019 ▶ CB01.UNO: Vota il tuo film preferito! 🎬', + 'Aggiornamento Quotidiano Serie TV', 'Openload: la situazione. Benvenuto Verystream', 'Openload: lo volete ancora?', - 'OSCAR 2020 ▶ VOTA IL TUO FILM PREFERITO! 🎬', - 'Auguri di Buon Natale e Felice Anno Nuovo! – 2021!'] + 'OSCAR ' + str(curYear) + ' ▶ VOTA IL TUO FILM PREFERITO! 🎬', + 'Auguri di Buon Natale e Felice Anno Nuovo! – ' + str(curYear) + '!'] # debug= True if 'newest' in item.args: if '/serietv/' not in item.url: diff --git a/channels/paramount.py b/channels/paramount.py index 40b0330f..2c22cbd7 100644 --- a/channels/paramount.py +++ b/channels/paramount.py @@ -86,7 +86,10 @@ def peliculas(item): new_data = load_more(more) data += new_data for it in data: - title = it['meta']['header']['title'] + try: + title = it['meta']['header']['title'] + except: + continue if item.text.lower() in title.lower(): itemlist.append( item.clone(title=support.typo(title,'bold'), diff --git a/channels/tunein.py b/channels/tunein.py index f30fd445..3626891c 100644 --- a/channels/tunein.py +++ b/channels/tunein.py @@ -33,7 +33,7 @@ def radio(item): data = support.match(item, patron= r'text="(?P