# -*- coding: utf-8 -*- # vStream https://github.com/Kodi-vStream/venom-xbmc-addons import re from resources.lib.gui.gui import cGui from resources.lib.handler.inputParameterHandler import cInputParameterHandler from resources.lib.handler.outputParameterHandler import cOutputParameterHandler from resources.lib.parser import cParser from resources.sites.freebox import getHtml, showWeb, play__ from resources.lib.comaddon import progress SITE_IDENTIFIER = 'iptv_source' SITE_NAME = 'IptvSource' SITE_DESC = 'Regarder la télévision' URL_MAIN = 'https://www.iptvsource.com/' def load(): oGui = cGui() oOutputParameterHandler = cOutputParameterHandler() oOutputParameterHandler.addParameter('siteUrl', URL_MAIN) oGui.addDir(SITE_IDENTIFIER, 'showDailyList', 'Dernières listes', 'listes.png', oOutputParameterHandler) oOutputParameterHandler = cOutputParameterHandler() oOutputParameterHandler.addParameter('siteUrl', URL_MAIN) oGui.addDir(SITE_IDENTIFIER, 'showPays', 'Choix du pays', 'lang.png', oOutputParameterHandler) oGui.setEndOfDirectory() def showPays(): oGui = cGui() oInputParameterHandler = cInputParameterHandler() sUrl = oInputParameterHandler.getValue('siteUrl') oParser = cParser() sHtmlContent = getHtml(sUrl) sPattern = '