diff --git a/channels/mondoserietv.py b/channels/mondoserietv.py index 6b507d1e..3b77b9e7 100644 --- a/channels/mondoserietv.py +++ b/channels/mondoserietv.py @@ -28,28 +28,24 @@ def mainlist(item): anime = ['/lista-cartoni-animati-e-anime'] - docu = [('Documentari bullet bold',['/lista-documentari', 'peliculas', '', 'tvshow']), - ('Cerca Documentari... submenu bold', ['/lista-documentari', 'search', '', 'tvshow'])] + docu = [('Documentari bullet bold',['/lista-documentari', 'peliculas', '', 'tvshow'])] + + search = '' return locals() -@support.scrape def search(item, text): support.log(text) if item.contentType == 'movie' or item.extra == 'movie': action = 'findvideos' else: action = 'episodios' + item.args = 'search' + item.url = host + "/?s=" + text try: - search = text - data = support.match(item, headers=headers)[1] - 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'
  • ]*>' - return locals() - - # Continua la ricerca in caso di errore + return peliculas(item) + # Continua la ricerca in caso di errore . except: import sys for line in sys.exc_info(): @@ -81,14 +77,26 @@ def newest(categoria): @support.scrape def peliculas(item): pagination = '' + anime = True patronNext = r'href="([^"]+)" title="[^"]+" class="lcp_nextlink"' + action = 'findvideos' if item.args == 'last': patronBlock = r'(?P.*?)
    ' patron = r'
    \s*[^>]+>(?P.*?)(?:\s(?P<year>\d{4}))? (?:Streaming|</b>)' elif item.args == 'lastep': 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>' - 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: 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}))?"[^>]*>' diff --git a/core/support.py b/core/support.py index 54941b8c..ad71e8e6 100755 --- a/core/support.py +++ b/core/support.py @@ -629,7 +629,7 @@ def menu(func): list_servers = func.__globals__['list_servers'] list_quality = func.__globals__['list_quality'] filename = func.__module__.split('.')[1] - + global_search = False # listUrls = ['film', 'filmSub', 'tvshow', 'tvshowSub', 'anime', 'animeSub', 'search', 'top', 'topSub'] listUrls = ['top', 'film', 'tvshow', 'anime', 'search'] listUrls_extra = [] @@ -647,7 +647,7 @@ def menu(func): if name == 'anime': title = 'Anime' if name == 'search' and dictUrl[name] is not None: - menuItem(itemlist, filename, 'Cerca… bold', 'search', host + dictUrl['search']) + global_search = True # Make TOP MENU elif name == 'top' and dictUrl[name] is not None: @@ -678,7 +678,7 @@ def menu(func): args=var[2] if len(var) > 2 else '', contentType= var[3] if len(var) > 3 else 'movie' if name == 'film' else 'tvshow',) # 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) for name, var in args.items(): @@ -694,6 +694,9 @@ def menu(func): args=var[2] if len(var) > 2 else '', 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.show_option(item.channel, itemlist)