Merge pull request #411 from lopezvg/master
EstrenosGo: canal reestructurado
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
@@ -9,8 +11,8 @@ def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
|
||||
itemlist.append(item.clone(action="categorias", title="Categorías", url="http://dato.porn/categories_all"))
|
||||
itemlist.append(item.clone(title="Buscar...", action="search"))
|
||||
itemlist.append(item.clone(action="categorias", title="Categorías", url="http://dato.porn/categories_all", contentType="movie", viewmode="movie"))
|
||||
itemlist.append(item.clone(title="Buscar...", action="search", contentType="movie", viewmode="movie"))
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -25,22 +27,27 @@ def lista(item):
|
||||
itemlist = []
|
||||
|
||||
# Descarga la pagina
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t|\s{2}|(<!--.*?-->)", "", httptools.downloadpage(item.url).data)
|
||||
|
||||
# Extrae las entradas
|
||||
patron = '<div class="vid_block">\s*<a href="([^"]+)".*?url\(\'([^\']+)\'.*?<span>(.*?)</span>.*?<b>(.*?)</b>'
|
||||
patron = '<div class="videobox">\s*<a href="([^"]+)".*?url\(\'([^\']+)\'.*?<span>(.*?)<\/span><\/div><\/a>.*?class="title">(.*?)<\/a><span class="views">.*?<\/a><\/span><\/div> '
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
for scrapedurl, scrapedthumbnail, duration, scrapedtitle in matches:
|
||||
if "/embed-" not in scrapedurl:
|
||||
scrapedurl = scrapedurl.replace("dato.porn/", "dato.porn/embed-") + ".html"
|
||||
#scrapedurl = scrapedurl.replace("dato.porn/", "dato.porn/embed-") + ".html"
|
||||
scrapedurl = scrapedurl.replace("datoporn.co/", "datoporn.co/embed-") + ".html"
|
||||
if duration:
|
||||
scrapedtitle = "%s - %s" % (duration, scrapedtitle)
|
||||
scrapedtitle += ' gb'
|
||||
scrapedtitle = scrapedtitle.replace(":", "'")
|
||||
|
||||
#logger.debug(scrapedurl + ' / ' + scrapedthumbnail + ' / ' + duration + ' / ' + scrapedtitle)
|
||||
itemlist.append(item.clone(action="play", title=scrapedtitle, url=scrapedurl, thumbnail=scrapedthumbnail,
|
||||
server="datoporn", fanart=scrapedthumbnail.replace("_t.jpg", ".jpg")))
|
||||
|
||||
# Extrae la marca de siguiente página
|
||||
next_page = scrapertools.find_single_match(data, '<a href=["|\']([^["|\']+)["|\']>Next')
|
||||
# Extrae la marca de siguiente página
|
||||
#next_page = scrapertools.find_single_match(data, '<a href=["|\']([^["|\']+)["|\']>Next')
|
||||
next_page = scrapertools.find_single_match(data, '<a class=["|\']page-link["|\'] href=["|\']([^["|\']+)["|\']>Next')
|
||||
if next_page and itemlist:
|
||||
itemlist.append(item.clone(action="lista", title=">> Página Siguiente", url=next_page))
|
||||
|
||||
|
||||
@@ -377,6 +377,7 @@ def newest(categoria):
|
||||
if categoria == 'torrent':
|
||||
item.url = host
|
||||
item.extra = "peliculas"
|
||||
item.category_new= 'newest'
|
||||
|
||||
itemlist = listado(item)
|
||||
if itemlist[-1].title == "Página siguiente >>":
|
||||
|
||||
@@ -3,13 +3,69 @@
|
||||
"name": "EstrenosGo",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["cast"],
|
||||
"fanart": "https://github.com/master-1970/resources/raw/master/images/fanart/estrenosgo.png",
|
||||
"thumbnail": "https://github.com/master-1970/resources/raw/master/images/squares/estrenosgo.png",
|
||||
"language": ["cast", "LAT", "VOSE", "VOS"],
|
||||
"fanart": "estrenosgo.png",
|
||||
"thumbnail": "estrenosgo.png",
|
||||
"banner": "estrenosgo.png",
|
||||
"categories": [
|
||||
"movie",
|
||||
"tvshow",
|
||||
"torrent"
|
||||
"torrent",
|
||||
"direct"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"id": "include_in_global_search",
|
||||
"label": "Incluir en busqueda global",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"id": "modo_grafico",
|
||||
"label": "Buscar información extra (TMDB)",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "timeout_downloadpage",
|
||||
"type": "list",
|
||||
"label": "Timeout (segs.) en descarga de páginas o verificación de servidores",
|
||||
"default": 5,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": [
|
||||
"None",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"7",
|
||||
"8",
|
||||
"9",
|
||||
"10"
|
||||
]
|
||||
},
|
||||
{
|
||||
"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": false
|
||||
}
|
||||
]
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1008,10 +1008,11 @@ def newest(categoria):
|
||||
try:
|
||||
if categoria == 'peliculas':
|
||||
item.url = host + "peliculas/"
|
||||
item.extra = "novedades"
|
||||
item.extra = "peliculas"
|
||||
item.channel = "mejortorrent1"
|
||||
item.category_new= 'newest'
|
||||
item.tipo = False
|
||||
itemlist = listado_busqueda(item)
|
||||
itemlist = listado(item)
|
||||
if "Pagina siguiente >>" in itemlist[-1].title:
|
||||
itemlist.pop()
|
||||
|
||||
@@ -1019,6 +1020,7 @@ def newest(categoria):
|
||||
item.url = host + "documentales/"
|
||||
item.extra = "documentales"
|
||||
item.channel = "mejortorrent1"
|
||||
item.category_new= 'newest'
|
||||
item.tipo = False
|
||||
itemlist = listado(item)
|
||||
if "Pagina siguiente >>" in itemlist[-1].title:
|
||||
|
||||
@@ -534,7 +534,7 @@
|
||||
{
|
||||
"id": "include_in_newest_latino",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - Documentales",
|
||||
"label": "Incluir en Novedades - Latino",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": false
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user