# -*- coding: utf-8 -*- # ------------------------------------------------------------ # Ringraziamo Icarus crew # Canale streaminghd # ------------------------------------------------------------ from core import httptools, scrapertools, servertools, listtools from core.item import Item from platformcode import logger from core import tmdb import re __channel__ = "streaminghd" listtools.__channel__ = __channel__ host = "https://streaminghd.online" headers = [['User-Agent', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0']] ## <-- user agent per poter accedere def mainlist(item): logger.info("[streaminghd.py] mainlist") # Main options itemlist = [Item(channel=item.channel, action="peliculas", title="[COLOR azure]Film[/COLOR]", url="%s/film/" % host, extracheck="film", thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"), Item(channel=item.channel, action="peliculas", title="[COLOR azure]Piu' Votati[/COLOR]", url="%s/piu-votati/" % host, extracheck="piuvotati", thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"), Item(channel=item.channel, action="peliculas", title="[COLOR azure]Piu' Visti[/COLOR]", url="%s/piu-visti//" % host, extracheck="piuvisti", thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"), Item(channel=item.channel, action="peliculas", title="[COLOR azure]Serie TV[/COLOR]", url="%s/serietv/serie/" % host, extracheck="serietv", thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"), Item(channel=item.channel, action="by_anno_or_by_genere", title="[COLOR azure]Genere[/COLOR]", url=host, extracheck="by_genere", thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"), Item(channel=item.channel, action="by_anno_or_by_genere", title="[COLOR azure]Elenco Per Anno[/COLOR]", url=host, extracheck="by_anno", thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"), Item(channel=item.channel, action="search", title="[COLOR yellow]Cerca Film[/COLOR]", extra="movie", thumbnail="http://dc467.4shared.com/img/fEbJqOum/s7/13feaf0c8c0/Search"), Item(channel=item.channel, action="search", title="[COLOR yellow]Cerca Serie[/COLOR]", extra="tvshow", thumbnail="http://dc467.4shared.com/img/fEbJqOum/s7/13feaf0c8c0/Search")] return itemlist def peliculas(item): logger.info("[streaminghd.py] peliculas") patron = '' if item.url == "": item.url = host # Carica la pagina data = httptools.downloadpage(item.url, headers=headers).data logger.info("[streaminghd.py] peliculas") datat = data ## Setting generic parameters for moth of movies itemp = {'title': '\\2 (\\5) [Rate: [COLOR yellow]\\3[/COLOR]]', 'url': '\\4', 'thumbnail': '\\1', 'extracheck': item.extracheck} tipos = 'movie' if 'serie' in item.extracheck: tipos = 'tv' itemp['content'] = 'tvshow' itemp['action'] = 'list_seasons' ## special condition for few movies if item.extracheck == "film": datat = scrapertools.find_single_match(data, '