diff --git a/channels/serietvsubita.json b/channels/serietvsubita.json index 4dd01090..7a4eafad 100644 --- a/channels/serietvsubita.json +++ b/channels/serietvsubita.json @@ -1,7 +1,7 @@ { "id": "serietvsubita", "name": "Serie TV Sub ITA", - "active": false, + "active": true, "adult": false, "language": ["ita"], "thumbnail": "http://serietvsubita.xyz/wp-content/uploads/2012/07/logo.jpg", @@ -12,7 +12,7 @@ "id": "channel_host", "type": "text", "label": "Host del canale", - "default": "http://serietvsubita.xyz/", + "default": "http://serietvsubita.xyz", "enabled": true, "visible": true }, @@ -39,6 +39,32 @@ "default": true, "enabled": true, "visible": true + }, + { + "id": "comprueba_enlaces", + "type": "bool", + "label": "Verifica se i link esistono", + "default": false, + "enabled": true, + "visible": true + }, + { + "id": "comprueba_enlaces_num", + "type": "list", + "label": "Numero de link da verificare", + "default": 1, + "enabled": true, + "visible": "eq(-1,true)", + "lvalues": [ "1", "3", "5", "10" ] + }, + { + "id": "filter_languages", + "type": "list", + "label": "Mostra link in lingua...", + "default": 0, + "enabled": true, + "visible": true, + "lvalues": ["Non filtrare","IT"] } ] } diff --git a/channels/serietvsubita.py b/channels/serietvsubita.py index 5edd00c0..4cb682d0 100644 --- a/channels/serietvsubita.py +++ b/channels/serietvsubita.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------ # Canale per Serie Tv Sub ITA -# Ringraziamo Icarus crew +# Thanks to Icarus crew & Alfa addon # ---------------------------------------------------------- import inspect import re @@ -9,11 +9,11 @@ import time import channelselector from channels import autoplay, support, filtertools -from core import httptools, tmdb, scrapertools +from core import httptools, tmdb, scrapertools, servertools from core.item import Item from platformcode import logger, config - -host = config.get_setting("channel_host", 'serietvsubita') +__channel__ = "serietvsubita" +host = config.get_setting("channel_host", __channel__) headers = [['Referer', host]] IDIOMAS = {'Italiano': 'IT'} @@ -21,6 +21,8 @@ list_language = IDIOMAS.values() list_servers = ['gounlimited','verystream','streamango','openload'] list_quality = ['default'] +# __comprueba_enlaces__ = config.get_setting('comprueba_enlaces', __channel__) +# __comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', __channel__) def mainlist(item): @@ -50,7 +52,7 @@ def mainlist(item): # ---------------------------------------------------------------------------------------------------------------- def cleantitle(scrapedtitle): scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle.strip()) - scrapedtitle = scrapedtitle.replace('[HD]', '').replace('’', '\'').replace('Game of Thrones –','') + scrapedtitle = scrapedtitle.replace('[HD]', '').replace('’', '\'').replace('×','x').replace('Game of Thrones –','') year = scrapertools.find_single_match(scrapedtitle, '\((\d{4})\)') if year: scrapedtitle = scrapedtitle.replace('(' + year + ')', '') @@ -73,12 +75,18 @@ def lista_serie(item): item.url, p = item.url.split('{}') p = int(p) - # Descarga la pagina - data = httptools.downloadpage(item.url).data + if '||' in item.url: + series = item.url.split('\n\n') + matches = [] + for i, serie in enumerate(series): + matches.append(serie.split('||')) + else: + # Descarga la pagina + data = httptools.downloadpage(item.url).data - # Extrae las entradas - patron = '