Fix paramount e tunein

This commit is contained in:
mac12m99
2021-04-18 14:11:29 +02:00
parent e21b58e82b
commit 4545075ba3
4 changed files with 11 additions and 7 deletions
+5 -4
View File
@@ -2,7 +2,7 @@
# ------------------------------------------------------------ # ------------------------------------------------------------
# Canale per cineblog01 # Canale per cineblog01
# ------------------------------------------------------------ # ------------------------------------------------------------
import datetime
import re import re
from core import scrapertools, httptools, servertools, support from core import scrapertools, httptools, servertools, support
@@ -91,11 +91,12 @@ def search(item, text):
@support.scrape @support.scrape
def peliculas(item): def peliculas(item):
# esclusione degli articoli 'di servizio' # esclusione degli articoli 'di servizio'
curYear = datetime.date.today().year
blacklist = ['BENVENUTI', 'Richieste Serie TV', 'CB01.UNO ▶ TROVA L’INDIRIZZO UFFICIALE ', 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?', 'Openload: la situazione. Benvenuto Verystream', 'Openload: lo volete ancora?',
'OSCAR 2020 ▶ VOTA IL TUO FILM PREFERITO! 🎬', 'OSCAR ' + str(curYear) + ' ▶ VOTA IL TUO FILM PREFERITO! 🎬',
'Auguri di Buon Natale e Felice Anno Nuovo! – 2021!'] 'Auguri di Buon Natale e Felice Anno Nuovo! – ' + str(curYear) + '!']
# debug= True # debug= True
if 'newest' in item.args: if 'newest' in item.args:
if '/serietv/' not in item.url: if '/serietv/' not in item.url:
+4 -1
View File
@@ -86,7 +86,10 @@ def peliculas(item):
new_data = load_more(more) new_data = load_more(more)
data += new_data data += new_data
for it in 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(): if item.text.lower() in title.lower():
itemlist.append( itemlist.append(
item.clone(title=support.typo(title,'bold'), item.clone(title=support.typo(title,'bold'),
+1 -1
View File
@@ -33,7 +33,7 @@ def radio(item):
data = support.match(item, patron= r'text="(?P<title>[^\("]+)(?:\((?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>[^"]+)"') data = support.match(item, patron= r'text="(?P<title>[^\("]+)(?:\((?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: if data.matches:
for title, location, url, quality, song, type, thumbnail in data.matches: for title, location, url, quality, song, type, thumbnail in data.matches:
title = scrapertools.unescape(title) title = scrapertools.decodeHtmlentities(title)
itemlist.append( itemlist.append(
item.clone(title = support.typo(title, 'bold') + support.typo(quality + ' kbps','_ [] bold color kod'), item.clone(title = support.typo(title, 'bold') + support.typo(quality + ' kbps','_ [] bold color kod'),
thumbnail = thumbnail, thumbnail = thumbnail,
+1 -1
View File
@@ -110,6 +110,7 @@ def unescape(text):
def fixup(m): def fixup(m):
text = m.group(0) text = m.group(0)
ret = text
if text[:2] == "&#": if text[:2] == "&#":
# character reference # character reference
try: try:
@@ -136,7 +137,6 @@ def unescape(text):
pass pass
except: except:
pass pass
# from core.support import dbg;dbg()
if type(ret) != str: if type(ret) != str:
ret = ret.decode() ret = ret.decode()
return ret # leave as is return ret # leave as is