#-*- coding: utf-8 -*- #Vstream https://github.com/Kodi-vStream/venom-xbmc-addons # Makoto from resources.lib.gui.hoster import cHosterGui from resources.lib.gui.gui import cGui from resources.lib.handler.inputParameterHandler import cInputParameterHandler from resources.lib.handler.outputParameterHandler import cOutputParameterHandler from resources.lib.handler.requestHandler import cRequestHandler from resources.lib.parser import cParser from resources.lib.comaddon import progress, VSlog SITE_IDENTIFIER = 'skyanimes' SITE_NAME = 'Sky-Animes' SITE_DESC = 'Animés, Dramas en Direct Download' URL_MAIN = 'http://www.sky-animes.com/' STREAM = 'index.php?file=Media&nuked_nude=index&op=do_dl&dl_id=' URL_SEARCH_SERIES = (URL_MAIN + 'index.php?file=Search&op=mod_search&searchtype=matchand&autor=&module=Download&limit=100&main=', 'showEpisode') FUNCTION_SEARCH = 'showEpisode' ANIM_VOSTFRS = (URL_MAIN + '', 'showCatA') SERIE_VOSTFRS = (URL_MAIN + '', 'showCatD') MOVIE_GENRESA = (True, 'showGenresA') MOVIE_GENRESD = (True, 'showGenresD') def load(): oGui = cGui() oOutputParameterHandler = cOutputParameterHandler() #appelle la fonction pour sortir un parametre oOutputParameterHandler.addParameter('siteUrl', URL_SEARCH_SERIES[0]) # sortie du parametres siteUrl n'oubliez pas la Majuscule oGui.addDir(SITE_IDENTIFIER, 'showSearch', 'Recherche', 'search.png', oOutputParameterHandler) oOutputParameterHandler = cOutputParameterHandler() oOutputParameterHandler.addParameter('siteUrl', ANIM_VOSTFRS[0]) oGui.addDir(SITE_IDENTIFIER, ANIM_VOSTFRS[1], 'Animés', 'animes.png', oOutputParameterHandler) oOutputParameterHandler = cOutputParameterHandler() oOutputParameterHandler.addParameter('siteUrl', SERIE_VOSTFRS[0]) oGui.addDir(SITE_IDENTIFIER, SERIE_VOSTFRS[1], 'Dramas', 'dramas.png', oOutputParameterHandler) oGui.setEndOfDirectory() def showCatA(): oGui = cGui() oOutputParameterHandler = cOutputParameterHandler() oOutputParameterHandler.addParameter('siteUrl', MOVIE_GENRESA[0]) oGui.addDir(SITE_IDENTIFIER, MOVIE_GENRESA[1], 'Animes (Genres)', 'genres.png', oOutputParameterHandler) liste = [] liste.append( ['En Cours', URL_MAIN + 'streaming-animes-en-cours?p=-1'] ) liste.append( ['Terminés', URL_MAIN + 'download-animes-termines?p=-1'] ) for sTitle, sUrl in liste: oOutputParameterHandler = cOutputParameterHandler() oOutputParameterHandler.addParameter('siteUrl', sUrl) oGui.addDir(SITE_IDENTIFIER, 'showSeries', sTitle, 'animes.png', oOutputParameterHandler) oGui.setEndOfDirectory() def showCatD(): oGui = cGui() oOutputParameterHandler = cOutputParameterHandler() oOutputParameterHandler.addParameter('siteUrl', MOVIE_GENRESD[0]) oGui.addDir(SITE_IDENTIFIER, MOVIE_GENRESD[1], 'Dramas (Genres)', 'genres.png', oOutputParameterHandler) liste = [] liste.append( ['En Cours', URL_MAIN + 'download-dramas-en-cours?p=-1'] ) liste.append( ['Terminés', URL_MAIN + 'download-dramas-termines?p=-1'] ) for sTitle, sUrl in liste: oOutputParameterHandler = cOutputParameterHandler() oOutputParameterHandler.addParameter('siteUrl', sUrl) oGui.addDir(SITE_IDENTIFIER, 'showSeries', sTitle, 'dramas.png', oOutputParameterHandler) oGui.setEndOfDirectory() def showGenresA(): oGui = cGui() oParser = cParser() sUrl = URL_MAIN + 'streaming-animes-en-cours' oRequestHandler = cRequestHandler(sUrl) sHtmlContent = oRequestHandler.request() sStart = 'id="id_genre"' sEnd = '