MejorTorrent: canal arreglado para nuevo dominio y estructura
Se conserva el canal anterior para las geografías donde todavía funciona. En las geografías donde está intervenido se desactiva automáticamente. Las series se migrarán automáticamente al nuevo canal si el anterior se desactiva. La películas se traducirán al nuevo canal cada vez que se visualicen
This commit is contained in:
@@ -1,57 +1,67 @@
|
||||
{
|
||||
"id": "mejortorrent",
|
||||
"name": "Mejor Torrent",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["*"],
|
||||
"thumbnail": "mejortorrent.png",
|
||||
"banner": "mejortorrent.png",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"banner": "mejortorrent.png",
|
||||
"categories": [
|
||||
"torrent",
|
||||
"movie",
|
||||
"tvshow",
|
||||
"torrent",
|
||||
"movie",
|
||||
"tvshow",
|
||||
"documentary"
|
||||
],
|
||||
],
|
||||
"id": "mejortorrent",
|
||||
"language": [
|
||||
"*"
|
||||
],
|
||||
"name": "Mejor Torrent",
|
||||
"settings": [
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Incluir en busqueda global",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"default": "http://www.mejortorrent.com/",
|
||||
"enabled": true,
|
||||
"id": "domain_name",
|
||||
"label": "URL actual de la Web Mejor Torrent",
|
||||
"type": "text",
|
||||
"visible": true
|
||||
},
|
||||
},
|
||||
{
|
||||
"id": "modo_grafico",
|
||||
"type": "bool",
|
||||
"label": "Buscar información extra (TMDB)",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"id": "include_in_global_search",
|
||||
"label": "Incluir en busqueda global",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
},
|
||||
{
|
||||
"id": "seleccionar_ult_temporadda_activa",
|
||||
"type": "bool",
|
||||
"label": "Seleccionar para Videoteca si estará activa solo la última Temporada",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"id": "modo_grafico",
|
||||
"label": "Buscar información extra (TMDB)",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_peliculas",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - Peliculas",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"id": "seleccionar_ult_temporadda_activa",
|
||||
"label": "Seleccionar para Videoteca si estará activa solo la última Temporada",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_documentales",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - Documentales",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"id": "include_in_newest_peliculas",
|
||||
"label": "Incluir en Novedades - Peliculas",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"id": "include_in_newest_documentales",
|
||||
"label": "Incluir en Novedades - Documentales",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"thumbnail": ", thumb_intervenido_pn.jpeg"
|
||||
}
|
||||
@@ -14,7 +14,8 @@ from platformcode import config, logger
|
||||
from core import tmdb
|
||||
from lib import generictools
|
||||
|
||||
host = "http://www.mejortorrent.com"
|
||||
host = 'http://www.mejortorrent.com/'
|
||||
#host = config.get_setting('domain_name', 'mejortorrent')
|
||||
|
||||
__modo_grafico__ = config.get_setting('modo_grafico', 'mejortorrent')
|
||||
|
||||
@@ -182,7 +183,12 @@ def listado(item):
|
||||
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
matches_cnt = len(matches)
|
||||
if not matches and not 'Se han encontrado <b>0</b> resultados.' in data: #error
|
||||
if not matches and not 'Se han encontrado <b>0</b> resultados.' in data: #error
|
||||
item = generictools.web_intervenida(item, data) #Verificamos que no haya sido clausurada
|
||||
if item.intervencion: #Sí ha sido clausurada judicialmente
|
||||
item, itemlist = generictools.post_tmdb_listado(item, itemlist) #Llamamos al método para el pintado del error
|
||||
return itemlist #Salimos
|
||||
|
||||
logger.error("ERROR 02: LISTADO: Ha cambiado la estructura de la Web " + " / PATRON: " + patron + " / DATA: " + data)
|
||||
itemlist.append(item.clone(action='', title=item.channel.capitalize() + ': ERROR 02: LISTADO: Ha cambiado la estructura de la Web. Reportar el error con el log'))
|
||||
return itemlist #si no hay más datos, algo no funciona, pintamos lo que tenemos
|
||||
@@ -495,7 +501,12 @@ def listado_busqueda(item):
|
||||
matches += re.compile(patron, re.DOTALL).findall(data)
|
||||
matches_cnt = len(matches)
|
||||
|
||||
if not matches and not 'Se han encontrado <b>0</b> resultados.' and not "href='/juego-descargar-torrent" in data: #error
|
||||
if not matches and not 'Se han encontrado <b>0</b> resultados.' and not "href='/juego-descargar-torrent" in data: #error
|
||||
item = generictools.web_intervenida(item, data) #Verificamos que no haya sido clausurada
|
||||
if item.intervencion: #Sí ha sido clausurada judicialmente
|
||||
item, itemlist = generictools.post_tmdb_listado(item, itemlist) #Llamamos al método para el pintado del error
|
||||
return itemlist #Salimos
|
||||
|
||||
logger.error("ERROR 02: LISTADO_BUSQUEDA: Ha cambiado la estructura de la Web " + " / PATRON: " + patron + " / DATA: " + data)
|
||||
itemlist.append(item.clone(action='', title=item.channel.capitalize() + ': ERROR 02: LISTADO_BUSQUEDA: Ha cambiado la estructura de la Web. Reportar el error con el log'))
|
||||
return itemlist #si no hay más datos, algo no funciona, pintamos lo que tenemos
|
||||
@@ -706,6 +717,7 @@ def findvideos(item):
|
||||
itemlist = []
|
||||
|
||||
#Bajamos los datos de la página
|
||||
data = ''
|
||||
try:
|
||||
if item.post: #Puede traer datos para una llamada "post". De momento usado para documentales, pero podrían ser series
|
||||
data = re.sub(r"\n|\r|\t|\s{2}|(<!--.*?-->)", "", httptools.downloadpage(item.url, post=item.post).data)
|
||||
@@ -720,6 +732,16 @@ def findvideos(item):
|
||||
return itemlist #si no hay más datos, algo no funciona, pintamos lo que tenemos
|
||||
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
if not matches:
|
||||
item = generictools.web_intervenida(item, data) #Verificamos que no haya sido clausurada
|
||||
if item.intervencion: #Sí ha sido clausurada judicialmente
|
||||
item, itemlist = generictools.post_tmdb_findvideos(item, itemlist) #Llamamos al método para el pintado del error
|
||||
return itemlist #Salimos
|
||||
|
||||
logger.error("ERROR 02: FINDVIDEOS: El archivo Torrent no existe o ha cambiado la estructura de la Web " + " / PATRON: " + patron + " / DATA: " + data)
|
||||
itemlist.append(item.clone(action='', title=item.category + ': ERROR 02: FINDVIDEOS: El archivo Torrent no existe o ha cambiado la estructura de la Web. Verificar en la Web y reportar el error con el log'))
|
||||
return itemlist #si no hay más datos, algo no funciona, pintamos lo que tenemos
|
||||
|
||||
#logger.debug(data)
|
||||
#logger.debug("PATRON: " + patron)
|
||||
#logger.debug(matches)
|
||||
@@ -814,6 +836,11 @@ def episodios(item):
|
||||
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
if not matches: #error
|
||||
item = generictools.web_intervenida(item, data) #Verificamos que no haya sido clausurada
|
||||
if item.intervencion: #Sí ha sido clausurada judicialmente
|
||||
item, itemlist = generictools.post_tmdb_findvideos(item, itemlist) #Llamamos al método para el pintado del error
|
||||
return itemlist #Salimos
|
||||
|
||||
logger.error("ERROR 02: EPISODIOS: Ha cambiado la estructura de la Web " + " / PATRON: " + patron + " / DATA: " + data)
|
||||
itemlist.append(item.clone(action='', title=item.channel.capitalize() + ': ERROR 02: EPISODIOS: Ha cambiado la estructura de la Web. Reportar el error con el log'))
|
||||
return itemlist #si no hay más datos, algo no funciona, pintamos lo que tenemos
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"id": "mejortorrent1",
|
||||
"name": "Mejor Torrent 1",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["*"],
|
||||
"thumbnail": "mejortorrent.png",
|
||||
"banner": "mejortorrent.png",
|
||||
"categories": [
|
||||
"torrent",
|
||||
"movie",
|
||||
"tvshow",
|
||||
"documentary"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"id": "domain_name",
|
||||
"type": "text",
|
||||
"label": "URL actual de la Web Mejor Torrent",
|
||||
"default": "https://mejortorrent1.com/",
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Incluir en busqueda global",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "modo_grafico",
|
||||
"type": "bool",
|
||||
"label": "Buscar información extra (TMDB)",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "seleccionar_ult_temporadda_activa",
|
||||
"type": "bool",
|
||||
"label": "Seleccionar para Videoteca si estará activa solo la última Temporada",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_peliculas",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - Peliculas",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_documentales",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - Documentales",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user