Fix Ricerca Mondoserie TV
This commit is contained in:
+20
-12
@@ -28,28 +28,24 @@ def mainlist(item):
|
|||||||
|
|
||||||
anime = ['/lista-cartoni-animati-e-anime']
|
anime = ['/lista-cartoni-animati-e-anime']
|
||||||
|
|
||||||
docu = [('Documentari bullet bold',['/lista-documentari', 'peliculas', '', 'tvshow']),
|
docu = [('Documentari bullet bold',['/lista-documentari', 'peliculas', '', 'tvshow'])]
|
||||||
('Cerca Documentari... submenu bold', ['/lista-documentari', 'search', '', 'tvshow'])]
|
|
||||||
|
search = ''
|
||||||
|
|
||||||
return locals()
|
return locals()
|
||||||
|
|
||||||
|
|
||||||
@support.scrape
|
|
||||||
def search(item, text):
|
def search(item, text):
|
||||||
support.log(text)
|
support.log(text)
|
||||||
if item.contentType == 'movie' or item.extra == 'movie':
|
if item.contentType == 'movie' or item.extra == 'movie':
|
||||||
action = 'findvideos'
|
action = 'findvideos'
|
||||||
else:
|
else:
|
||||||
action = 'episodios'
|
action = 'episodios'
|
||||||
|
item.args = 'search'
|
||||||
|
item.url = host + "/?s=" + text
|
||||||
try:
|
try:
|
||||||
search = text
|
return peliculas(item)
|
||||||
data = support.match(item, headers=headers)[1]
|
# Continua la ricerca in caso di errore .
|
||||||
if 'lcp_nextlink' in data:
|
|
||||||
data += support.match(item, url=support.scrapertoolsV2.find_single_match(data, r'href="([^"]+)" title="[^"]+" class="lcp_nextlink"'), headers=headers)[1]
|
|
||||||
patron = r'<li><a href="(?P<url>[^"]+)" title="(?P<title>.*?)(?:\s(?P<year>\d{4}))?"[^>]*>'
|
|
||||||
return locals()
|
|
||||||
|
|
||||||
# Continua la ricerca in caso di errore
|
|
||||||
except:
|
except:
|
||||||
import sys
|
import sys
|
||||||
for line in sys.exc_info():
|
for line in sys.exc_info():
|
||||||
@@ -81,14 +77,26 @@ def newest(categoria):
|
|||||||
@support.scrape
|
@support.scrape
|
||||||
def peliculas(item):
|
def peliculas(item):
|
||||||
pagination = ''
|
pagination = ''
|
||||||
|
anime = True
|
||||||
patronNext = r'href="([^"]+)" title="[^"]+" class="lcp_nextlink"'
|
patronNext = r'href="([^"]+)" title="[^"]+" class="lcp_nextlink"'
|
||||||
|
action = 'findvideos'
|
||||||
if item.args == 'last':
|
if item.args == 'last':
|
||||||
patronBlock = r'<table>(?P<block>.*?)</table>'
|
patronBlock = r'<table>(?P<block>.*?)</table>'
|
||||||
patron = r'<tr><td><a href="(?P<url>[^"]+)">\s*[^>]+>(?P<title>.*?)(?:\s(?P<year>\d{4}))? (?:Streaming|</b>)'
|
patron = r'<tr><td><a href="(?P<url>[^"]+)">\s*[^>]+>(?P<title>.*?)(?:\s(?P<year>\d{4}))? (?:Streaming|</b>)'
|
||||||
elif item.args == 'lastep':
|
elif item.args == 'lastep':
|
||||||
patronBlock = r'<table>(?P<block>.*?)</table>'
|
patronBlock = r'<table>(?P<block>.*?)</table>'
|
||||||
patron = r'<td>\s*<a href="[^>]+>(?P<title>.*?)(?:\s(?P<year>\d{4}))?\s(?:(?P<episode>(?:\d+x\d+|\d+)))\s*(?P<title2>[^<]+)(?P<url>.*?)<tr>'
|
patron = r'<td>\s*<a href="[^>]+>(?P<title>.*?)(?:\s(?P<year>\d{4}))?\s(?:(?P<episode>(?:\d+x\d+|\d+)))\s*(?P<title2>[^<]+)(?P<url>.*?)<tr>'
|
||||||
action = 'findvideos'
|
elif item.args == 'search':
|
||||||
|
patronBlock = r'<div class="peliculas">(?P<block>.*?)<div id="paginador"'
|
||||||
|
patron = r'class="item">\s*<a href="(?P<url>[^"]+)">\s*<div class="image">\s*<img src="(?P<thumb>[^"]+)" alt="(?P<title>.+?)(?:"| \d{4}).*?<span class="ttx">(?P<plot>[^<]+)<div class="degradado">[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*(?:<span class="imdbs">(?P<rating>[^<]+))?(?:[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<year>\d+))?'
|
||||||
|
def itemHook(item):
|
||||||
|
if '/film/' in item.url:
|
||||||
|
item.contentType = 'movie'
|
||||||
|
item.action = 'findvideos'
|
||||||
|
else:
|
||||||
|
item.contentType = 'tvshow'
|
||||||
|
item.action = 'episodios'
|
||||||
|
return item
|
||||||
else:
|
else:
|
||||||
patronBlock = r'<div class="entry-content pagess">(?P<block>.*?)</ul>'
|
patronBlock = r'<div class="entry-content pagess">(?P<block>.*?)</ul>'
|
||||||
patron = r'<li><a href="(?P<url>[^"]+)" title="(?P<title>.*?)(?:\s(?P<year>\d{4}))?"[^>]*>'
|
patron = r'<li><a href="(?P<url>[^"]+)" title="(?P<title>.*?)(?:\s(?P<year>\d{4}))?"[^>]*>'
|
||||||
|
|||||||
+6
-3
@@ -629,7 +629,7 @@ def menu(func):
|
|||||||
list_servers = func.__globals__['list_servers']
|
list_servers = func.__globals__['list_servers']
|
||||||
list_quality = func.__globals__['list_quality']
|
list_quality = func.__globals__['list_quality']
|
||||||
filename = func.__module__.split('.')[1]
|
filename = func.__module__.split('.')[1]
|
||||||
|
global_search = False
|
||||||
# listUrls = ['film', 'filmSub', 'tvshow', 'tvshowSub', 'anime', 'animeSub', 'search', 'top', 'topSub']
|
# listUrls = ['film', 'filmSub', 'tvshow', 'tvshowSub', 'anime', 'animeSub', 'search', 'top', 'topSub']
|
||||||
listUrls = ['top', 'film', 'tvshow', 'anime', 'search']
|
listUrls = ['top', 'film', 'tvshow', 'anime', 'search']
|
||||||
listUrls_extra = []
|
listUrls_extra = []
|
||||||
@@ -647,7 +647,7 @@ def menu(func):
|
|||||||
if name == 'anime': title = 'Anime'
|
if name == 'anime': title = 'Anime'
|
||||||
|
|
||||||
if name == 'search' and dictUrl[name] is not None:
|
if name == 'search' and dictUrl[name] is not None:
|
||||||
menuItem(itemlist, filename, 'Cerca… bold', 'search', host + dictUrl['search'])
|
global_search = True
|
||||||
|
|
||||||
# Make TOP MENU
|
# Make TOP MENU
|
||||||
elif name == 'top' and dictUrl[name] is not None:
|
elif name == 'top' and dictUrl[name] is not None:
|
||||||
@@ -678,7 +678,7 @@ def menu(func):
|
|||||||
args=var[2] if len(var) > 2 else '',
|
args=var[2] if len(var) > 2 else '',
|
||||||
contentType= var[3] if len(var) > 3 else 'movie' if name == 'film' else 'tvshow',)
|
contentType= var[3] if len(var) > 3 else 'movie' if name == 'film' else 'tvshow',)
|
||||||
# add search menu for category
|
# add search menu for category
|
||||||
if 'search' not in args: menuItem(itemlist, filename, 'Cerca ' + title + '… submenu bold', 'search', host + url, contentType='movie' if name == 'film' else 'tvshow')
|
if 'search' not in args: menuItem(itemlist, filename, config.get_localized_string(70741) % title + ' … submenu bold', 'search', host + url, contentType='movie' if name == 'film' else 'tvshow')
|
||||||
|
|
||||||
# Make EXTRA MENU (on bottom)
|
# Make EXTRA MENU (on bottom)
|
||||||
for name, var in args.items():
|
for name, var in args.items():
|
||||||
@@ -694,6 +694,9 @@ def menu(func):
|
|||||||
args=var[2] if len(var) > 2 else '',
|
args=var[2] if len(var) > 2 else '',
|
||||||
contentType= var[3] if len(var) > 3 else 'movie',)
|
contentType= var[3] if len(var) > 3 else 'movie',)
|
||||||
|
|
||||||
|
if global_search:
|
||||||
|
menuItem(itemlist, filename, config.get_localized_string(70741) % '… bold', 'search', host + dictUrl['search'])
|
||||||
|
|
||||||
|
|
||||||
autoplay.init(item.channel, list_servers, list_quality)
|
autoplay.init(item.channel, list_servers, list_quality)
|
||||||
autoplay.show_option(item.channel, itemlist)
|
autoplay.show_option(item.channel, itemlist)
|
||||||
|
|||||||
Reference in New Issue
Block a user