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[^\("]+)(?:\((?P<location>[^\)]+)\))?" URL="(?P<url>[^"]+)" bitrate="(?P<quality>[^"]+)" reliability="[^"]+" guide_id="[^"]+" subtext="(?P<song>[^"]+)" genre_id="[^"]+" formats="(?P<type>[^"]+)" (?:playing="[^"]+" )?(?:playing_image="[^"]+" )?(?:show_id="[^"]+" )?(?:item="[^"]+" )?image="(?P<thumb>[^"]+)"') if data.matches: for title, location, url, quality, song, type, thumbnail in data.matches: - title = scrapertools.unescape(title) + title = scrapertools.decodeHtmlentities(title) itemlist.append( item.clone(title = support.typo(title, 'bold') + support.typo(quality + ' kbps','_ [] bold color kod'), thumbnail = thumbnail, diff --git a/core/scrapertools.py b/core/scrapertools.py index 133e5d3b..d6e1027e 100644 --- a/core/scrapertools.py +++ b/core/scrapertools.py @@ -110,6 +110,7 @@ def unescape(text): def fixup(m): text = m.group(0) + ret = text if text[:2] == "&#": # character reference try: @@ -136,7 +137,6 @@ def unescape(text): pass except: pass - # from core.support import dbg;dbg() if type(ret) != str: ret = ret.decode() return ret # leave as is