# -*- coding: utf-8 -*- # ------------------------------------------------------------ # Canale per HD4ME # ------------------------------------------------------------ from core import httptools, support host = support.config.get_channel_url() headers = [['Referer', host]] list_servers = ['mega'] list_quality = ['default'] @support.menu def mainlist(item): film = [('Genere', ['', 'genre'])] return locals() @support.scrape def peliculas(item): # debug = True if item.args == 'alternative': patron = r'(?P[^<]+)<' def itemHook(item): if item.fulltitle in ['Classici Disney', 'Studio Ghibli', 'Pixar']: item.args = 'alternative' return item return locals() def search(item, text): support.log(text) item.url = host + '/?s=' + text try: return peliculas(item) # Cattura la eccezione così non interrompe la ricerca globle se il canale si rompe! except: import sys for line in sys.exc_info(): support.logger.error("search except: %s" % line) return [] def findvideos(item): url = support.match(item, patron=r'<a class="bot1" href="([^"]+)"').match url = support.httptools.downloadpage(url, followredirect=True).url return support.server(item, url)