Varios 2
danimados: agregado buscador del canal sipeliculas: fix play megadrive: nuevo server
This commit is contained in:
@@ -8,5 +8,15 @@
|
|||||||
"banner": "https://imgur.com/xG5xqBq.png",
|
"banner": "https://imgur.com/xG5xqBq.png",
|
||||||
"categories": [
|
"categories": [
|
||||||
"tvshow"
|
"tvshow"
|
||||||
|
],
|
||||||
|
"settings": [
|
||||||
|
{
|
||||||
|
"id": "include_in_global_search",
|
||||||
|
"type": "bool",
|
||||||
|
"label": "Incluir en busqueda global",
|
||||||
|
"default": true,
|
||||||
|
"enabled": true,
|
||||||
|
"visible": true
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
import base64
|
||||||
|
|
||||||
from channelselector import get_thumb
|
from channelselector import get_thumb
|
||||||
from core import httptools
|
from core import httptools
|
||||||
@@ -22,48 +23,64 @@ list_quality = ['default']
|
|||||||
|
|
||||||
def mainlist(item):
|
def mainlist(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
|
|
||||||
thumb_series = get_thumb("channels_tvshow.png")
|
thumb_series = get_thumb("channels_tvshow.png")
|
||||||
autoplay.init(item.channel, list_servers, list_quality)
|
autoplay.init(item.channel, list_servers, list_quality)
|
||||||
|
|
||||||
itemlist = list()
|
itemlist = list()
|
||||||
|
|
||||||
itemlist.append(Item(channel=item.channel, action="mainpage", title="Categorías", url=host,
|
itemlist.append(Item(channel=item.channel, action="mainpage", title="Categorías", url=host,
|
||||||
thumbnail=thumb_series))
|
thumbnail=thumb_series))
|
||||||
itemlist.append(Item(channel=item.channel, action="mainpage", title="Más Populares", url=host,
|
|
||||||
thumbnail=thumb_series))
|
|
||||||
itemlist.append(Item(channel=item.channel, action="lista", title="Peliculas Animadas", url=host+"peliculas/",
|
itemlist.append(Item(channel=item.channel, action="lista", title="Peliculas Animadas", url=host+"peliculas/",
|
||||||
thumbnail=thumb_series))
|
thumbnail=thumb_series))
|
||||||
|
itemlist.append(Item(channel=item.channel, action="search", title="Buscar", url=host + "?s=",
|
||||||
|
thumbnail=thumb_series))
|
||||||
autoplay.show_option(item.channel, itemlist)
|
autoplay.show_option(item.channel, itemlist)
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
"""
|
|
||||||
def search(item, texto):
|
def search(item, texto):
|
||||||
logger.info()
|
logger.info()
|
||||||
texto = texto.replace(" ","+")
|
texto = texto.replace(" ","+")
|
||||||
item.url = item.url+texto
|
item.url = host + "?s=" + texto
|
||||||
if texto!='':
|
if texto!='':
|
||||||
return lista(item)
|
return sub_search(item)
|
||||||
"""
|
|
||||||
|
|
||||||
|
def sub_search(item):
|
||||||
|
logger.info()
|
||||||
|
itemlist = []
|
||||||
|
data = httptools.downloadpage(item.url).data
|
||||||
|
patron = 'class="thumbnail animation-.*?href="([^"]+).*?'
|
||||||
|
patron += 'img src="([^"]+).*?'
|
||||||
|
patron += 'alt="([^"]+).*?'
|
||||||
|
patron += 'class="year">(\d{4})'
|
||||||
|
matches = scrapertools.find_multiple_matches(data, patron)
|
||||||
|
for scrapedurl, scrapedthumbnail, scrapedtitle, scrapedyear in matches:
|
||||||
|
item.action = "findvideos"
|
||||||
|
item.contentTitle = scrapedtitle
|
||||||
|
item.contentSerieName = ""
|
||||||
|
if "serie" in scrapedurl:
|
||||||
|
item.action = "episodios"
|
||||||
|
item.contentTitle = ""
|
||||||
|
item.contentSerieName = scrapedtitle
|
||||||
|
title = scrapedtitle
|
||||||
|
if scrapedyear:
|
||||||
|
item.infoLabels['year'] = int(scrapedyear)
|
||||||
|
title += " (%s)" %item.infoLabels['year']
|
||||||
|
itemlist.append(item.clone(thumbnail = scrapedthumbnail,
|
||||||
|
title = title,
|
||||||
|
url = scrapedurl
|
||||||
|
))
|
||||||
|
tmdb.set_infoLabels(itemlist)
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
def mainpage(item):
|
def mainpage(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
|
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
|
||||||
data1 = httptools.downloadpage(item.url).data
|
data1 = httptools.downloadpage(item.url).data
|
||||||
data1 = re.sub(r"\n|\r|\t|\s{2}| ", "", data1)
|
data1 = re.sub(r"\n|\r|\t|\s{2}| ", "", data1)
|
||||||
if item.title=="Más Populares":
|
patron_sec='<ul id="main_header".+?>(.+?)<\/ul><\/div>'
|
||||||
patron_sec='<a class="lglossary" data-type.+?>(.+?)<\/ul>'
|
patron='<a href="([^"]+)">([^"]+)<\/a>'#scrapedurl, #scrapedtitle
|
||||||
patron='<img .+? src="([^"]+)".+?<a href="([^"]+)".+?>([^"]+)<\/a>' #scrapedthumbnail, #scrapedurl, #scrapedtitle
|
|
||||||
if item.title=="Categorías":
|
|
||||||
patron_sec='<ul id="main_header".+?>(.+?)<\/ul><\/div>'
|
|
||||||
patron='<a href="([^"]+)">([^"]+)<\/a>'#scrapedurl, #scrapedtitle
|
|
||||||
|
|
||||||
data = scrapertools.find_single_match(data1, patron_sec)
|
data = scrapertools.find_single_match(data1, patron_sec)
|
||||||
|
|
||||||
matches = scrapertools.find_multiple_matches(data, patron)
|
matches = scrapertools.find_multiple_matches(data, patron)
|
||||||
if item.title=="Géneros" or item.title=="Categorías":
|
if item.title=="Géneros" or item.title=="Categorías":
|
||||||
for scrapedurl, scrapedtitle in matches:
|
for scrapedurl, scrapedtitle in matches:
|
||||||
@@ -82,11 +99,10 @@ def mainpage(item):
|
|||||||
return itemlist
|
return itemlist
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
def lista(item):
|
def lista(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
|
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
|
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
|
||||||
if item.title=="Peliculas Animadas":
|
if item.title=="Peliculas Animadas":
|
||||||
@@ -114,8 +130,8 @@ def lista(item):
|
|||||||
|
|
||||||
def episodios(item):
|
def episodios(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
|
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
infoLabels = {}
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
|
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
|
||||||
data_lista = scrapertools.find_single_match(data,
|
data_lista = scrapertools.find_single_match(data,
|
||||||
@@ -123,51 +139,52 @@ def episodios(item):
|
|||||||
show = item.title
|
show = item.title
|
||||||
patron_caps = '<img alt=".+?" src="([^"]+)"><\/a><\/div><div class=".+?">([^"]+)<\/div>.+?'
|
patron_caps = '<img alt=".+?" src="([^"]+)"><\/a><\/div><div class=".+?">([^"]+)<\/div>.+?'
|
||||||
patron_caps += '<a .+? href="([^"]+)">([^"]+)<\/a>'
|
patron_caps += '<a .+? href="([^"]+)">([^"]+)<\/a>'
|
||||||
#scrapedthumbnail,#scrapedtempepi, #scrapedurl, #scrapedtitle
|
|
||||||
matches = scrapertools.find_multiple_matches(data_lista, patron_caps)
|
matches = scrapertools.find_multiple_matches(data_lista, patron_caps)
|
||||||
for scrapedthumbnail, scrapedtempepi, scrapedurl, scrapedtitle in matches:
|
for scrapedthumbnail, scrapedtempepi, scrapedurl, scrapedtitle in matches:
|
||||||
tempepi=scrapedtempepi.split(" - ")
|
tempepi=scrapedtempepi.split(" - ")
|
||||||
if tempepi[0]=='Pel':
|
if tempepi[0]=='Pel':
|
||||||
tempepi[0]=0
|
tempepi[0]=0
|
||||||
title="{0}x{1} - ({2})".format(tempepi[0], tempepi[1].zfill(2), scrapedtitle)
|
title="{0}x{1} - ({2})".format(tempepi[0], tempepi[1].zfill(2), scrapedtitle)
|
||||||
itemlist.append(Item(channel=item.channel, thumbnail=scrapedthumbnail,
|
item.infoLabels["season"] = tempepi[0]
|
||||||
action="findvideos", title=title, url=scrapedurl, show=show))
|
item.infoLabels["episode"] = tempepi[1]
|
||||||
|
itemlist.append(item.clone(thumbnail=scrapedthumbnail,
|
||||||
|
action="findvideos", title=title, url=scrapedurl))
|
||||||
if config.get_videolibrary_support() and len(itemlist) > 0:
|
if config.get_videolibrary_support() and len(itemlist) > 0:
|
||||||
itemlist.append(Item(channel=item.channel, title="[COLOR yellow]Añadir " + show + " a la videoteca[/COLOR]", url=item.url,
|
itemlist.append(Item(channel=item.channel, title="[COLOR yellow]Añadir " + show + " a la videoteca[/COLOR]", url=item.url,
|
||||||
action="add_serie_to_library", extra="episodios", show=show))
|
action="add_serie_to_library", extra="episodios", show=show))
|
||||||
|
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
def findvideos(item):
|
def findvideos(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
import base64
|
|
||||||
|
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
|
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
|
||||||
data1 = scrapertools.find_single_match(data,
|
data1 = scrapertools.find_single_match(data,
|
||||||
'<div id="playex" .+?>(.+?)<\/nav>?\s<\/div><\/div>')
|
'<div id="playex" .+?>(.+?)<\/nav>?\s<\/div><\/div>')
|
||||||
patron = "changeLink\('([^']+)'\)"
|
patron = "changeLink\('([^']+)'\)"
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data1)
|
matches = re.compile(patron, re.DOTALL).findall(data1)
|
||||||
|
|
||||||
for url64 in matches:
|
for url64 in matches:
|
||||||
url =base64.b64decode(url64)
|
url1 =base64.b64decode(url64)
|
||||||
if 'danimados' in url:
|
if 'danimados' in url1:
|
||||||
new_data = httptools.downloadpage('https:'+url.replace('stream', 'stream_iframe')).data
|
new_data = httptools.downloadpage('https:'+url1.replace('stream', 'stream_iframe')).data
|
||||||
url = scrapertools.find_single_match(new_data, '<source src="([^"]+)"')
|
logger.info("Intel33 %s" %new_data)
|
||||||
|
url = scrapertools.find_single_match(new_data, "sources: \[\{file:'([^']+)")
|
||||||
itemlist.append(item.clone(title='%s',url=url, action="play"))
|
if "zkstream" in url:
|
||||||
|
url1 = httptools.downloadpage(url, follow_redirects=False, only_headers=True).headers.get("location", "")
|
||||||
|
else:
|
||||||
|
url1 = url
|
||||||
|
itemlist.append(item.clone(title='%s',url=url1, action="play"))
|
||||||
|
tmdb.set_infoLabels(itemlist)
|
||||||
itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server.capitalize())
|
itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server.capitalize())
|
||||||
|
|
||||||
if config.get_videolibrary_support() and len(itemlist) > 0 and item.contentType=="movie" and item.contentChannel!='videolibrary':
|
if config.get_videolibrary_support() and len(itemlist) > 0 and item.contentType=="movie" and item.contentChannel!='videolibrary':
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
item.clone(channel=item.channel, title='[COLOR yellow]Añadir esta pelicula a la videoteca[/COLOR]', url=item.url,
|
item.clone(channel=item.channel, title='[COLOR yellow]Añadir esta pelicula a la videoteca[/COLOR]', url=item.url,
|
||||||
action="add_pelicula_to_library", contentTitle=item.show))
|
action="add_pelicula_to_library"))
|
||||||
|
|
||||||
autoplay.start(itemlist, item)
|
autoplay.start(itemlist, item)
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
def play(item):
|
||||||
|
item.thumbnail = item.contentThumbnail
|
||||||
|
return [item]
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import re
|
|
||||||
import urlparse
|
|
||||||
|
|
||||||
from core import httptools
|
from core import httptools
|
||||||
from core import scrapertools
|
from core import scrapertools
|
||||||
from core import servertools
|
from core import servertools
|
||||||
@@ -12,10 +9,8 @@ from platformcode import logger
|
|||||||
|
|
||||||
host = 'http://www.sipeliculas.com'
|
host = 'http://www.sipeliculas.com'
|
||||||
|
|
||||||
|
|
||||||
def mainlist(item):
|
def mainlist(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
|
|
||||||
itemlist = []
|
itemlist = []
|
||||||
itemlist.append(item.clone(title="Novedades", action="lista", url=host + "/cartelera/"))
|
itemlist.append(item.clone(title="Novedades", action="lista", url=host + "/cartelera/"))
|
||||||
itemlist.append(item.clone(title="Actualizadas", action="lista", url=host + "/peliculas-actualizadas/"))
|
itemlist.append(item.clone(title="Actualizadas", action="lista", url=host + "/peliculas-actualizadas/"))
|
||||||
@@ -24,7 +19,6 @@ def mainlist(item):
|
|||||||
itemlist.append(item.clone(title="Año", action="menuseccion", url=host, extra="/estrenos-gratis/"))
|
itemlist.append(item.clone(title="Año", action="menuseccion", url=host, extra="/estrenos-gratis/"))
|
||||||
itemlist.append(item.clone(title="Alfabetico", action="alfabetica", url=host + '/mirar/'))
|
itemlist.append(item.clone(title="Alfabetico", action="alfabetica", url=host + '/mirar/'))
|
||||||
itemlist.append(item.clone(title="Buscar", action="search", url=host + "/ver/"))
|
itemlist.append(item.clone(title="Buscar", action="search", url=host + "/ver/"))
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
@@ -33,7 +27,6 @@ def alfabetica(item):
|
|||||||
itemlist = []
|
itemlist = []
|
||||||
for letra in "1abcdefghijklmnopqrstuvwxyz":
|
for letra in "1abcdefghijklmnopqrstuvwxyz":
|
||||||
itemlist.append(item.clone(title=letra.upper(), url=item.url + letra, action="lista"))
|
itemlist.append(item.clone(title=letra.upper(), url=item.url + letra, action="lista"))
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
@@ -42,7 +35,6 @@ def menuseccion(item):
|
|||||||
itemlist = []
|
itemlist = []
|
||||||
seccion = item.extra
|
seccion = item.extra
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
|
|
||||||
if seccion == '/online/':
|
if seccion == '/online/':
|
||||||
data = scrapertools.find_single_match(data,
|
data = scrapertools.find_single_match(data,
|
||||||
'<h2 class="[^"]+"><i class="[^"]+"></i>Películas por géneros<u class="[^"]+"></u></h2>(.*?)<ul class="abc">')
|
'<h2 class="[^"]+"><i class="[^"]+"></i>Películas por géneros<u class="[^"]+"></u></h2>(.*?)<ul class="abc">')
|
||||||
@@ -50,8 +42,7 @@ def menuseccion(item):
|
|||||||
elif seccion == '/estrenos-gratis/':
|
elif seccion == '/estrenos-gratis/':
|
||||||
data = scrapertools.find_single_match(data, '<ul class="lista-anio" id="lista-anio">(.*?)</ul>')
|
data = scrapertools.find_single_match(data, '<ul class="lista-anio" id="lista-anio">(.*?)</ul>')
|
||||||
patron = '<li ><a href="([^"]+)" title="[^"]+">([^<]+)</a></li>'
|
patron = '<li ><a href="([^"]+)" title="[^"]+">([^<]+)</a></li>'
|
||||||
|
matches = scrapertools.find_multiple_matches(data, patron)
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
|
||||||
for scrapedurl, extra in matches:
|
for scrapedurl, extra in matches:
|
||||||
itemlist.append(Item(channel=item.channel, action='lista', title=extra, url=scrapedurl))
|
itemlist.append(Item(channel=item.channel, action='lista', title=extra, url=scrapedurl))
|
||||||
return itemlist
|
return itemlist
|
||||||
@@ -64,22 +55,19 @@ def lista(item):
|
|||||||
listado = scrapertools.find_single_match(data,
|
listado = scrapertools.find_single_match(data,
|
||||||
'<div id="sipeliculas" class="borde"><div class="izquierda">(.*?)<div class="derecha"><h2')
|
'<div id="sipeliculas" class="borde"><div class="izquierda">(.*?)<div class="derecha"><h2')
|
||||||
patron = '<a class="i" href="(.*?)".*?src="(.*?)".*?title=.*?>(.*?)<.*?span>(.*?)<.*?<p><span>(.*?)<'
|
patron = '<a class="i" href="(.*?)".*?src="(.*?)".*?title=.*?>(.*?)<.*?span>(.*?)<.*?<p><span>(.*?)<'
|
||||||
|
matches = scrapertools.find_multiple_matches(listado, patron)
|
||||||
matches = re.compile(patron, re.DOTALL).findall(listado)
|
|
||||||
|
|
||||||
for scrapedurl, scrapedthumbnail, scrapedtitle, year, plot in matches:
|
for scrapedurl, scrapedthumbnail, scrapedtitle, year, plot in matches:
|
||||||
itemlist.append(Item(channel=item.channel, action='findvideos', title=scrapedtitle, url=scrapedurl,
|
itemlist.append(Item(channel=item.channel, action='findvideos', title=scrapedtitle + " (%s)" %year, url=scrapedurl,
|
||||||
thumbnail=scrapedthumbnail, plot=plot, contentTitle=scrapedtitle, extra=item.extra,
|
thumbnail=scrapedthumbnail, contentTitle=scrapedtitle, extra=item.extra,
|
||||||
infoLabels ={'year':year}))
|
infoLabels ={'year':year}))
|
||||||
|
|
||||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||||
# Paginacion
|
# Paginacion
|
||||||
if itemlist != []:
|
if itemlist != []:
|
||||||
patron = '<li[^<]+<a href="([^"]+)" title="[^"]+">Siguiente[^<]+</a></li>'
|
patron = '<li[^<]+<a href="([^"]+)" title="[^"]+">Siguiente[^<]+</a></li>'
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
matches = scrapertools.find_multiple_matches(data, patron)
|
||||||
if matches:
|
if matches:
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
item.clone(title="Pagina Siguiente", action='lista', url=urlparse.urljoin(host, matches[0])))
|
item.clone(title="Pagina Siguiente", action='lista', url=host + "/" + matches[0]))
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
@@ -97,11 +85,10 @@ def findvideos(item):
|
|||||||
logger.info()
|
logger.info()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
|
|
||||||
listado1 = scrapertools.find_single_match(data,
|
listado1 = scrapertools.find_single_match(data,
|
||||||
'<div class="links" id="ver-mas-opciones"><h2 class="h2"><i class="[^"]+"></i>[^<]+</h2><ul class="opciones">(.*?)</ul>')
|
'<div class="links" id="ver-mas-opciones"><h2 class="h2"><i class="[^"]+"></i>[^<]+</h2><ul class="opciones">(.*?)</ul>')
|
||||||
patron1 = '<li ><a id="([^"]+)" rel="nofollow" href="([^"]+)" title="[^"]+" alt="([^"]+)"><span class="opcion"><i class="[^"]+"></i><u>[^<]+</u>[^<]+</span><span class="ico"><img src="[^"]+" alt="[^"]+"/>[^<]+</span><span>([^"]+)</span><span>([^"]+)</span></a></li>'
|
patron1 = '<li ><a id="([^"]+)" rel="nofollow" href="([^"]+)" title="[^"]+" alt="([^"]+)"><span class="opcion"><i class="[^"]+"></i><u>[^<]+</u>[^<]+</span><span class="ico"><img src="[^"]+" alt="[^"]+"/>[^<]+</span><span>([^"]+)</span><span>([^"]+)</span></a></li>'
|
||||||
matches = matches = re.compile(patron1, re.DOTALL).findall(listado1)
|
matches = matches = scrapertools.find_multiple_matches(listado1, patron1)
|
||||||
for vidId, vidUrl, vidServer, language, quality in matches:
|
for vidId, vidUrl, vidServer, language, quality in matches:
|
||||||
server = servertools.get_server_name(vidServer)
|
server = servertools.get_server_name(vidServer)
|
||||||
if 'Sub' in language:
|
if 'Sub' in language:
|
||||||
@@ -109,39 +96,32 @@ def findvideos(item):
|
|||||||
itemlist.append(Item(channel=item.channel, action='play', url=vidUrl, extra=vidId,
|
itemlist.append(Item(channel=item.channel, action='play', url=vidUrl, extra=vidId,
|
||||||
title='Ver en ' + vidServer + ' | ' + language + ' | ' + quality,
|
title='Ver en ' + vidServer + ' | ' + language + ' | ' + quality,
|
||||||
thumbnail=item.thumbnail, server=server, language=language, quality=quality ))
|
thumbnail=item.thumbnail, server=server, language=language, quality=quality ))
|
||||||
|
|
||||||
listado2 = scrapertools.find_single_match(data, '<ul class="opciones-tab">(.*?)</ul>')
|
listado2 = scrapertools.find_single_match(data, '<ul class="opciones-tab">(.*?)</ul>')
|
||||||
patron2 = '<li ><a id="([^"]+)" rel="nofollow" href="([^"]+)" title="[^"]+" alt="([^"]+)"><img src="[^"]+" alt="[^"]+"/>[^<]+</a></li>'
|
patron2 = '<li ><a id="([^"]+)" rel="nofollow" href="([^"]+)" title="[^"]+" alt="([^"]+)"><img src="[^"]+" alt="[^"]+"/>[^<]+</a></li>'
|
||||||
matches = matches = re.compile(patron2, re.DOTALL).findall(listado2)
|
matches = matches = scrapertools.find_multiple_matches(listado2, patron2)
|
||||||
for vidId, vidUrl, vidServer in matches:
|
for vidId, vidUrl, vidServer in matches:
|
||||||
server = servertools.get_server_name(vidServer)
|
server = servertools.get_server_name(vidServer)
|
||||||
itemlist.append(Item(channel=item.channel, action='play', url=vidUrl, extra=vidId, title='Ver en ' + vidServer,
|
itemlist.append(Item(channel=item.channel, action='play', url=vidUrl, extra=vidId, title='Ver en ' + vidServer,
|
||||||
thumbnail=item.thumbnail, server=server))
|
thumbnail=item.thumbnail, server=server))
|
||||||
|
|
||||||
for videoitem in itemlist:
|
for videoitem in itemlist:
|
||||||
videoitem.fulltitle = item.title
|
videoitem.fulltitle = item.title
|
||||||
videoitem.folder = False
|
videoitem.folder = False
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
def play(item):
|
def play(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
data = httptools.downloadpage(item.url).data
|
||||||
video = httptools.downloadpage(host + '/ajax.public.php', 'acc=ver_opc&f=' + item.extra).data
|
video = scrapertools.find_single_match(data, '</div><iframe src="([^"]+)')
|
||||||
logger.info("video=" + video)
|
if video:
|
||||||
enlaces = servertools.findvideos(video)
|
|
||||||
if enlaces:
|
|
||||||
logger.info("server=" + enlaces[0][2])
|
|
||||||
thumbnail = servertools.guess_server_thumbnail(video)
|
|
||||||
# Añade al listado de XBMC
|
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel, action="play", title=item.title, fulltitle=item.fulltitle, url=enlaces[0][1],
|
item.clone(action="play", url=video, folder=False, server=""))
|
||||||
server=enlaces[0][2], thumbnail=thumbnail, folder=False))
|
itemlist = servertools.get_servers_itemlist(itemlist)
|
||||||
|
itemlist[0].thumbnail = item.contentThumbnail
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
def newest(categoria):
|
def newest(categoria):
|
||||||
logger.info()
|
logger.info()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
@@ -155,16 +135,13 @@ def newest(categoria):
|
|||||||
item.url = host + "/online/terror/"
|
item.url = host + "/online/terror/"
|
||||||
else:
|
else:
|
||||||
return []
|
return []
|
||||||
|
|
||||||
itemlist = lista(item)
|
itemlist = lista(item)
|
||||||
if itemlist[-1].title == "» Siguiente »":
|
if itemlist[-1].title == "» Siguiente »":
|
||||||
itemlist.pop()
|
itemlist.pop()
|
||||||
|
|
||||||
# Se captura la excepción, para no interrumpir al canal novedades si un canal falla
|
# Se captura la excepción, para no interrumpir al canal novedades si un canal falla
|
||||||
except:
|
except:
|
||||||
import sys
|
import sys
|
||||||
for line in sys.exc_info():
|
for line in sys.exc_info():
|
||||||
logger.error("{0}".format(line))
|
logger.error("{0}".format(line))
|
||||||
return []
|
return []
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|||||||
Executable → Regular
+7
-10
@@ -4,18 +4,14 @@
|
|||||||
"ignore_urls": [],
|
"ignore_urls": [],
|
||||||
"patterns": [
|
"patterns": [
|
||||||
{
|
{
|
||||||
"pattern": "http://tusfiles.org/\\?([A-z0-9]+)",
|
"pattern": "megadrive.co/embed/([A-z0-9]+)",
|
||||||
"url": "http://tusfiles.org/?\\1/"
|
"url": "https://megadrive.co/embed/\\1"
|
||||||
},
|
|
||||||
{
|
|
||||||
"pattern": "tusfiles.net/(?:embed-|)([A-z0-9]+)",
|
|
||||||
"url": "http://tusfiles.net/\\1"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"free": true,
|
"free": true,
|
||||||
"id": "tusfiles",
|
"id": "megadrive",
|
||||||
"name": "tusfiles",
|
"name": "megadrive",
|
||||||
"settings": [
|
"settings": [
|
||||||
{
|
{
|
||||||
"default": false,
|
"default": false,
|
||||||
@@ -41,5 +37,6 @@
|
|||||||
"type": "list",
|
"type": "list",
|
||||||
"visible": false
|
"visible": false
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
}
|
"thumbnail": "https://s8.postimg.cc/kr5olxmad/megadrive1.png"
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from core import httptools
|
||||||
|
from core import scrapertools
|
||||||
|
from platformcode import logger
|
||||||
|
|
||||||
|
|
||||||
|
def test_video_exists(page_url):
|
||||||
|
logger.info("(page_url='%s')" % page_url)
|
||||||
|
data = httptools.downloadpage(page_url).data
|
||||||
|
if "no longer exists" in data or "to copyright issues" in data:
|
||||||
|
return False, "[Megadrive] El video ha sido borrado"
|
||||||
|
if "please+try+again+later." in data:
|
||||||
|
return False, "[Megadrive] Error de Megadrive, no se puede generar el enlace al video"
|
||||||
|
if "File has been removed due to inactivity" in data:
|
||||||
|
return False, "[Megadrive] El archivo ha sido removido por inactividad"
|
||||||
|
return True, ""
|
||||||
|
|
||||||
|
|
||||||
|
def get_video_url(page_url, user="", password="", video_password=""):
|
||||||
|
logger.info("(page_url='%s')" % page_url)
|
||||||
|
data = httptools.downloadpage(page_url).data
|
||||||
|
video_urls = []
|
||||||
|
videourl = scrapertools.find_single_match(data, "<source.*?src='([^']+)")
|
||||||
|
video_urls.append([".MP4 [megadrive]", videourl])
|
||||||
|
|
||||||
|
return video_urls
|
||||||
Reference in New Issue
Block a user