# -*- coding: utf-8 -*- # vStream https://github.com/Kodi-vStream/venom-xbmc-addons # jordigarnacho import re 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 SITE_IDENTIFIER = 'mamcin' SITE_NAME = 'Mamcin' SITE_DESC = 'plus belle la vie, streaming, séries, récent' URL_MAIN = 'https://www.mamcin.com/' # FUNCTION_SEARCH = 'showMovies' SERIE_NEWS = (URL_MAIN, 'showMovies') SERIE_SERIES = (URL_MAIN, 'showMovies') # SERIE_GENRES = (True, 'showGenres') # loader function def load(): oGui = cGui() oOutputParameterHandler = cOutputParameterHandler() oOutputParameterHandler.addParameter('siteUrl', SERIE_NEWS[0]) oGui.addDir(SITE_IDENTIFIER, SERIE_NEWS[1], 'Plus Belle La Vie (Derniers ajouts)', 'news.png', oOutputParameterHandler) oGui.setEndOfDirectory() # search function # def showSearch(): # oGui = cGui() # sSearchText = oGui.showKeyBoard() # if (sSearchText != False): # sUrl = URL_SEARCH[0] + sSearchText # showMovies(sUrl) # oGui.setEndOfDirectory() # return # genre definition def showGenres(): oGui = cGui() liste = [] liste.append( ['News', URL_MAIN + 'non-classe/'] ) for sTitle, sUrl in liste: oOutputParameterHandler = cOutputParameterHandler() oOutputParameterHandler.addParameter('siteUrl', sUrl) oGui.addDir(SITE_IDENTIFIER, 'showMovies', sTitle, 'genres.png', oOutputParameterHandler) oGui.setEndOfDirectory() # function to extract episodes def showMovies(sSearch=''): oGui = cGui() if sSearch: sUrl = sSearch else: oInputParameterHandler = cInputParameterHandler() sUrl = oInputParameterHandler.getValue('siteUrl') oRequestHandler = cRequestHandler(sUrl) sHtmlContent = oRequestHandler.request() sPattern = '