# -*- coding: utf-8 -*- # ------------------------------------------------------------ # Canale per fastsubita # Thanks Icarus crew & Alfa addon & 4l3x87 # ------------------------------------------------------------ from core import scrapertools, httptools, tmdb, support from core.item import Item from core.support import log from platformcode import config, logger __channel__ = 'fastsubita' host = config.get_setting("channel_host", __channel__) IDIOMAS = {'Italiano': 'IT'} list_language = IDIOMAS.values() list_servers = ['verystream', 'openload', 'speedvideo', 'wstream', 'flashx', 'vidoza', 'vidtome'] list_quality = ['default'] headers = [ ['Host', host.split("//")[-1].split("/")[0]], ['User-Agent', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0'], ['Accept', 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'], ['Accept-Language', 'en-US,en;q=0.5'], ['Accept-Encoding', 'gzip, deflate'], ['Referer', host], ['DNT', '1'], ['Connection', 'keep-alive'], ['Upgrade-Insecure-Requests', '1'], ['Cache-Control', 'max-age=0'] ] PERPAGE = 15 @support.menu def mainlist(item): tvshow = ['', ('Novità', ['', 'peliculas']), ('Archivio A-Z ', ['', 'list_az']) ] return locals() # ---------------------------------------------------------------------------------------------------------------- def cleantitle(scrapedtitle): scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle.strip()) scrapedtitle = scrapedtitle.replace('’', '\'').replace('×', 'x').replace('×', 'x').replace('"', "'") return scrapedtitle.strip() # ================================================================================================================ def newest(categoria): log() itemlist = [] item = Item() try: if categoria == "series": item.url = host # item.action = "serietv" itemlist = peliculas(item) if itemlist[-1].action == "serietv": itemlist.pop() # Continua la ricerca in caso di errore except: import sys for line in sys.exc_info(): logger.error("{0}".format(line)) return [] return itemlist def peliculas(item): log() itemlist = [] matches, data = support.match(item, r'