diff --git a/channels/guardogratis.py b/channels/guardogratis.py index e69de29b..f5808ef4 100644 --- a/channels/guardogratis.py +++ b/channels/guardogratis.py @@ -0,0 +1,221 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------ +# Ringraziamo Icarus crew +# Canale per guardogratis +# +# ---------------------------------------------------------- +import re +import urlparse + +from core import httptools +from platformcode import logger, config +from core import scrapertools +from core import servertools +from core.item import Item +from core import tmdb + +__channel__ = "guardogratis" + +host = "https://guardogratis.it/" + +headers = [['Referer', host]] + +def mainlist(item): + logger.info("[guardogratis.py] mainlist") + + # Main options + itemlist = [Item(channel=item.channel, + action="list_titles", + title="[COLOR azure]Film[/COLOR]", + url="%s/movies/" % host, + extra="movie", + 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="list_titles", + title="[COLOR azure]Top Film[/COLOR]", + url="%s/top-imdb/" % host, + extra="movie", + 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="categorie", + title="[COLOR azure]Categorie[/COLOR]", + url="%s" % host, + extra="categorie", + 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="list_titles", + title="[COLOR azure]Serie Tv[/COLOR]", + url="%s/series/" % host, + extra="tvshow", + 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 SerieTV[/COLOR]", + extra="tvshow", + thumbnail="http://dc467.4shared.com/img/fEbJqOum/s7/13feaf0c8c0/Search")] + + return itemlist + +def list_titles(item): + logger.info("[guardogratis.py] list_titles") + itemlist = [] + + tipo='movie' + if 'tvshow' in item.extra: tipo='tv' + + if item.url == "": + item.url = host + # Carica la pagina + data = httptools.downloadpage(item.url, headers=headers).data + + patronvideos = '