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