Fix Serie HD
This commit is contained in:
@@ -382,58 +382,57 @@ def auto_filter(auto_lang=False):
|
||||
|
||||
def thumb(item_or_itemlist=None, genre=False, thumb=''):
|
||||
import re
|
||||
icon_dict = {'movie':['film'],
|
||||
'tvshow':['serie','tv','episodi','episodio','fiction'],
|
||||
icon_dict = {'movie':['film', 'movie'],
|
||||
'tvshow':['serie','tv','episodi','episodio','fiction', 'show'],
|
||||
'documentary':['documentari','documentario', 'documentary'],
|
||||
'teenager':['ragazzi','teenager', 'teen'],
|
||||
'learning':['learning'],
|
||||
'all':['tutti'],
|
||||
'news':['novità', "novita'", 'aggiornamenti', 'nuovi', 'nuove'],
|
||||
'all':['tutti', 'all'],
|
||||
'news':['novità', "novita'", 'aggiornamenti', 'nuovi', 'nuove', 'new', 'newest', 'news'],
|
||||
'now_playing':['cinema', 'in sala'],
|
||||
'anime':['anime'],
|
||||
'genres':['genere', 'generi', 'categorie', 'categoria'],
|
||||
'genres':['genere', 'generi', 'categorie', 'categoria', 'category'],
|
||||
'animation': ['animazione', 'cartoni', 'cartoon', 'animation'],
|
||||
'action':['azione', 'arti marziali', 'action'],
|
||||
'adventure': ['avventura', 'adventure'],
|
||||
'biographical':['biografico'],
|
||||
'comedy':['comico','commedia', 'demenziale', 'comedy'],
|
||||
'adult':['erotico', 'hentai', 'harem', 'ecchi'],
|
||||
'biographical':['biografico', 'biographical'],
|
||||
'comedy':['comico', 'commedia', 'demenziale', 'comedy'],
|
||||
'adult':['erotico', 'hentai', 'harem', 'ecchi', 'adult'],
|
||||
'drama':['drammatico', 'drama'],
|
||||
'syfy':['fantascienza', 'science fiction'],
|
||||
'fantasy':['fantasy', 'magia'],
|
||||
'syfy':['fantascienza', 'science fiction', 'syfy'],
|
||||
'fantasy':['fantasy', 'magia', 'magic'],
|
||||
'crime':['gangster','poliziesco', 'crime', 'crimine'],
|
||||
'grotesque':['grottesco'],
|
||||
'grotesque':['grottesco', 'grotesque'],
|
||||
'war':['guerra', 'war'],
|
||||
'children':['bambini', 'kids'],
|
||||
'horror':['horror'],
|
||||
'lucky': ['fortunato'],
|
||||
'musical':['musical', 'musica', 'music'],
|
||||
'music':['musical', 'musica', 'music'],
|
||||
'mistery':['mistero', 'giallo', 'mystery'],
|
||||
'noir':['noir'],
|
||||
'popular' : ['popolari','popolare', 'più visti'],
|
||||
'thriller':['thriller'],
|
||||
'top_rated' : ['fortunato', 'votati'],
|
||||
'top_rated' : ['fortunato', 'votati', 'lucky'],
|
||||
'on_the_air' : ['corso', 'onda', 'diretta', 'dirette'],
|
||||
'western':['western'],
|
||||
'vos':['sub','sub-ita'],
|
||||
'romance':['romantico','sentimentale', 'romance'],
|
||||
'family':['famiglia','famiglie', 'family'],
|
||||
'family':['famiglia','famiglie', 'family', 'historical'],
|
||||
'historical':['storico', 'history', 'storia'],
|
||||
'az':['lettera','lista','alfabetico','a-z'],
|
||||
'year':['anno', 'anni'],
|
||||
'az':['lettera','lista','alfabetico','a-z', 'alphabetical'],
|
||||
'year':['anno', 'anni', 'year'],
|
||||
'update':['replay', 'update'],
|
||||
'autoplay':[config.get_localized_string(60071)]
|
||||
}
|
||||
|
||||
suffix_dict = {'_hd':['hd','altadefinizione','alta definizione'],
|
||||
'_4k':['4K'],
|
||||
'_az':['lettera','lista','alfabetico','a-z'],
|
||||
'_year':['anno', 'anni'],
|
||||
'_az':['lettera','lista','alfabetico','a-z', 'alphabetical'],
|
||||
'_year':['anno', 'anni', 'year'],
|
||||
'_genre':['genere', 'generi', 'categorie', 'categoria']}
|
||||
|
||||
search = ['cerca']
|
||||
search = ['cerca', 'search']
|
||||
|
||||
search_suffix ={'_movie':['film'],
|
||||
search_suffix ={'_movie':['film', 'movie'],
|
||||
'_tvshow':['serie','tv', 'fiction']}
|
||||
|
||||
def autoselect_thumb(item, genre):
|
||||
@@ -446,7 +445,7 @@ def thumb(item_or_itemlist=None, genre=False, thumb=''):
|
||||
thumb = thumb + suffix
|
||||
item.thumbnail = get_thumb(thumb + '.png')
|
||||
elif any( word in re.split(r'\.|\{|\}|\[|\]|\(|\)| ',item.title.lower()) for word in titles ):
|
||||
if thumb == 'channels_movie' or thumb == 'channels_tvshow':
|
||||
if thumb == 'movie' or thumb == 'tvshow':
|
||||
for suffix, titles in suffix_dict.items():
|
||||
if any( word in re.split(r'\.|\{|\}|\[|\]|\(|\)| ',item.title.lower()) for word in titles ):
|
||||
thumb = thumb + suffix
|
||||
|
||||
@@ -34,11 +34,11 @@ def hdpass_get_servers(item):
|
||||
def get_hosts(url, quality):
|
||||
ret = []
|
||||
page = httptools.downloadpage(url).data
|
||||
log(page)
|
||||
|
||||
mir = scrapertools.find_single_match(page, patron_mir)
|
||||
|
||||
for mir_url, srv in scrapertools.find_multiple_matches(mir, patron_option):
|
||||
mir_url = scrapertools.decodeHtmlentities(mir_url)
|
||||
ret.append(Item(channel=item.channel,
|
||||
action="play",
|
||||
fulltitle=item.fulltitle,
|
||||
@@ -48,7 +48,7 @@ def hdpass_get_servers(item):
|
||||
contentType=item.contentType,
|
||||
title=srv,
|
||||
server=srv,
|
||||
url=mir_url.replace('&','&')))
|
||||
url= mir_url))
|
||||
return ret
|
||||
# Carica la pagina
|
||||
itemlist = []
|
||||
@@ -74,6 +74,7 @@ def hdpass_get_servers(item):
|
||||
with futures.ThreadPoolExecutor() as executor:
|
||||
thL = []
|
||||
for res_url, res_video in scrapertools.find_multiple_matches(res, patron_option):
|
||||
res_url = scrapertools.decodeHtmlentities(res_url)
|
||||
thL.append(executor.submit(get_hosts, res_url, res_video))
|
||||
for res in futures.as_completed(thL):
|
||||
if res.result():
|
||||
@@ -168,6 +169,7 @@ def scrapeLang(scraped, lang, longtitle):
|
||||
|
||||
def cleantitle(title):
|
||||
if type(title) != str: title.decode('UTF-8')
|
||||
title = scrapertools.decodeHtmlentities(title)
|
||||
cleantitle = title.replace('"', "'").replace('×', 'x').replace('–', '-').strip()
|
||||
return cleantitle
|
||||
|
||||
@@ -301,8 +303,8 @@ def scrapeBlock(item, args, block, patron, headers, action, pagination, debug, t
|
||||
infoLabels=infolabels,
|
||||
thumbnail=item.thumbnail if function == 'episodios' and not scraped["thumb"] else scraped["thumb"] if scraped["thumb"] else '',
|
||||
args=item.args,
|
||||
contentSerieName= scraped['title'] if scraped['title'] else item.fulltitle if item.contentType or CT != 'movie' and function != 'episodios' else item.fulltitle if function == 'episodios' else '',
|
||||
contentTitle= scraped['title'] if item.contentType or CT == 'movie' else '',
|
||||
contentSerieName= title if title else item.fulltitle if item.contentType or CT != 'movie' and function != 'episodios' else item.fulltitle if function == 'episodios' else '',
|
||||
contentTitle= title if item.contentType or CT == 'movie' else '',
|
||||
contentLanguage = lang1,
|
||||
contentEpisodeNumber=episode if episode else '',
|
||||
news= item.news if item.news else '',
|
||||
|
||||
Reference in New Issue
Block a user