Nuevos Canales: Cuevana2 y Cuevana2español
This commit is contained in:
@@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"id": "cuevana2",
|
||||||
|
"name": "Cuevana2",
|
||||||
|
"active": true,
|
||||||
|
"adult": false,
|
||||||
|
"language": ["en"],
|
||||||
|
"thumbnail": "cuevana2.png",
|
||||||
|
"categories": [
|
||||||
|
"movie",
|
||||||
|
"tvshow",
|
||||||
|
"vos"
|
||||||
|
],
|
||||||
|
"settings": [
|
||||||
|
{
|
||||||
|
"id": "modo_grafico",
|
||||||
|
"type": "bool",
|
||||||
|
"label": "Buscar información extra",
|
||||||
|
"default": true,
|
||||||
|
"enabled": true,
|
||||||
|
"visible": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "include_in_global_search",
|
||||||
|
"type": "bool",
|
||||||
|
"label": "Incluir en busqueda global",
|
||||||
|
"default": true,
|
||||||
|
"enabled": true,
|
||||||
|
"visible": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,290 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
import re
|
||||||
|
from channelselector import get_thumb
|
||||||
|
|
||||||
|
from core.item import Item
|
||||||
|
from core import httptools
|
||||||
|
from core import scrapertools
|
||||||
|
from core import servertools
|
||||||
|
from platformcode import config, logger
|
||||||
|
from channels import autoplay
|
||||||
|
from lib import requests
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
host = "http://www.cuevana2.com/"
|
||||||
|
__channel__ = "cuevana2"
|
||||||
|
list_quality = []
|
||||||
|
list_servers = ['rapidvideo', 'streamango', 'directo', 'yourupload', 'openload', 'dostream']
|
||||||
|
|
||||||
|
### MENUS ###
|
||||||
|
|
||||||
|
def mainlist(item):
|
||||||
|
logger.info()
|
||||||
|
autoplay.init(item.channel, list_servers, list_quality)
|
||||||
|
itemlist = []
|
||||||
|
itemlist.append(Item(channel = item.channel, title = "Peliculas", action = "movies_menu",
|
||||||
|
url = host + "pelicula", thumbnail = get_thumb("movies", auto = True)))
|
||||||
|
itemlist.append(Item(channel = item.channel, title = "Series", action = "shows_menu",
|
||||||
|
url = host + "pelicula", thumbnail = get_thumb("tvshows", auto = True) ))
|
||||||
|
itemlist.append(Item(channel = item.channel, title = "Buscar...", action = "search",
|
||||||
|
url = host + "search/", thumbnail = get_thumb("search", auto = True)))
|
||||||
|
autoplay.show_option(item.channel, itemlist)
|
||||||
|
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
def movies_menu(item):
|
||||||
|
itemlist = []
|
||||||
|
|
||||||
|
itemlist.append(Item(channel = item.channel, title = "Novedades", action = "movies",
|
||||||
|
url = host + "pelicula", thumbnail = get_thumb("newest", auto = True)))
|
||||||
|
itemlist.append(Item(channel = item.channel, title = "Por género", action = "genre",
|
||||||
|
url = host + "pelicula", thumbnail = get_thumb("genres", auto = True) ))
|
||||||
|
itemlist.append(Item(channel = item.channel, title = "Por año", action = "age",
|
||||||
|
url = host + "pelicula", thumbnail = get_thumb("year", auto = True)))
|
||||||
|
itemlist.append(Item(channel = item.channel, title = "Favoritas", action = "movies",
|
||||||
|
url = host + "peliculas-destacadas", thumbnail = get_thumb("favorites", auto = True) ))
|
||||||
|
itemlist.append(Item(channel = item.channel, title = ""))
|
||||||
|
itemlist.append(Item(channel = item.channel, title = "Buscar...", action = "search",
|
||||||
|
url = host + "search/", thumbnail = get_thumb("search", auto = True)))
|
||||||
|
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
def shows_menu(item):
|
||||||
|
itemlist = []
|
||||||
|
itemlist.append(Item(channel = item.channel, title = "Todas las Series", action = "shows",
|
||||||
|
url = host + "listar-series", thumbnail = get_thumb("tvshows", auto = True)))
|
||||||
|
itemlist.append(Item(channel = item.channel, title = "Buscar...", action = "search", extra='1',
|
||||||
|
url = host + "listar-series", thumbnail = get_thumb("search", auto = True)))
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
### FIN MENUS ###
|
||||||
|
def inArray(arr, arr2):
|
||||||
|
for word in arr:
|
||||||
|
if word not in arr2:
|
||||||
|
return False
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
|
def load_data(url):
|
||||||
|
data = httptools.downloadpage(url).data
|
||||||
|
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||||
|
|
||||||
|
return data
|
||||||
|
|
||||||
|
def put_movies(itemlist, data, pattern):
|
||||||
|
matches = scrapertools.find_multiple_matches(data, pattern)
|
||||||
|
for link, img, title, rating, plot in matches:
|
||||||
|
if 'pelicula' in link:
|
||||||
|
itemTitle = "%s [COLOR yellow](%s/100)[/COLOR]" % (title, rating)
|
||||||
|
itemlist.append(Item(channel = __channel__, title=itemTitle, fulltitle=title, thumbnail=img,
|
||||||
|
url=link, plot=plot, action="findvideos"))
|
||||||
|
logger.info(link)
|
||||||
|
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
def put_episodes(itemlist, item, text):
|
||||||
|
pattern = '<li>.*?ref="([^"]+).*?"tit">(.*?)</span>'
|
||||||
|
|
||||||
|
matches = scrapertools.find_multiple_matches(text, pattern)
|
||||||
|
for link, title in matches:
|
||||||
|
itemlist.append(item.clone(title=title, fulltitle=item.title, url=link, action='findvideos', extra=1))
|
||||||
|
|
||||||
|
def episodes(item):
|
||||||
|
logger.info()
|
||||||
|
itemlist = []
|
||||||
|
|
||||||
|
data = load_data(item.url)
|
||||||
|
seasonsPattern = '"#episodios(\d+)".*?>(.*?)</a>'
|
||||||
|
episodesPattern = 'id="episodios%s">(.*?)</ul>'
|
||||||
|
|
||||||
|
matches = scrapertools.find_multiple_matches(data, seasonsPattern)
|
||||||
|
for season, title in matches:
|
||||||
|
itemlist.append(Item(channel = __channel__, title="[COLOR blue]%s[/COLOR]" % title))
|
||||||
|
episodeMatches = scrapertools.find_single_match(data, episodesPattern % season)
|
||||||
|
put_episodes(itemlist, item, episodeMatches)
|
||||||
|
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
def shows(item):
|
||||||
|
logger.info()
|
||||||
|
itemlist = []
|
||||||
|
|
||||||
|
data = load_data(item.url)
|
||||||
|
pattern = '"in"><a href="([^"]+)">(.*?)</a>'
|
||||||
|
|
||||||
|
matches = scrapertools.find_multiple_matches(data, pattern)
|
||||||
|
for link, title in matches:
|
||||||
|
itemlist.append(Item(channel = __channel__, title=title, url=host + link, action="episodes"))
|
||||||
|
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
def movies(item):
|
||||||
|
logger.info()
|
||||||
|
itemlist = []
|
||||||
|
|
||||||
|
#descarga la pagina html
|
||||||
|
data = load_data(item.url)
|
||||||
|
|
||||||
|
#patron para buscar las peliculas
|
||||||
|
pattern = '<a href="([^"]+)"><div class="img">' #link
|
||||||
|
pattern += '<img width="120" height="160" src="([^"]+)" class="attachment-thumbnail wp-post-image" alt="([^"]+)".*?' #img and title
|
||||||
|
pattern += '<span style="width:([0-9]+)%">.*?'
|
||||||
|
pattern += '"txt">(.*?)</div>' # text
|
||||||
|
|
||||||
|
put_movies(itemlist, data, pattern)
|
||||||
|
|
||||||
|
next_page = scrapertools.find_single_match(data, '<a class="nextpostslink" rel="next" href="([^"]+)">')
|
||||||
|
if next_page:
|
||||||
|
itemlist.append(Item(channel = __channel__, title='Siguiente Pagina', url=next_page, action="movies"))
|
||||||
|
|
||||||
|
#coloca las peliculas encontradas en la lista
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
def searchShows(itemlist, item, texto):
|
||||||
|
texto = texto.lower().split()
|
||||||
|
data = load_data(item.url)
|
||||||
|
|
||||||
|
pattern = '"in"><a href="([^"]+)">(.*?)</a>'
|
||||||
|
|
||||||
|
matches = scrapertools.find_multiple_matches(data, pattern)
|
||||||
|
for link, title in matches:
|
||||||
|
keywords = title.lower().split()
|
||||||
|
logger.info(keywords)
|
||||||
|
logger.info(texto)
|
||||||
|
|
||||||
|
if inArray(texto, keywords):
|
||||||
|
itemlist.append(Item(channel = __channel__, title=title, url=host + link, action="episodes"))
|
||||||
|
|
||||||
|
|
||||||
|
def searchMovies(itemlist, item, texto):
|
||||||
|
texto = texto.replace(' ', '+').lower()
|
||||||
|
data = load_data(item.url + texto)
|
||||||
|
#patron para buscar las peliculas
|
||||||
|
pattern = '<a href="([^"]+)"><div class="img">' #link
|
||||||
|
pattern += '<img width="120" height="160" src="([^"]+)" class="attachment-thumbnail wp-post-image" alt="([^"]+)".*?' #img and title
|
||||||
|
pattern += '<span style="width:([0-9]+)%">.*?'
|
||||||
|
pattern += '"txt">(.*?)</div>' # text
|
||||||
|
|
||||||
|
#coloca las peliculas encontradas en la lista, improvisando do while
|
||||||
|
next_page = True
|
||||||
|
while next_page:
|
||||||
|
put_movies(itemlist, data, pattern)
|
||||||
|
next_page = scrapertools.find_single_match(data, '<a class="nextpostslink" rel="next" href="([^"]+)">')
|
||||||
|
|
||||||
|
if next_page:
|
||||||
|
data = load_data(next_page)
|
||||||
|
|
||||||
|
def search(item, texto):
|
||||||
|
itemlist = []
|
||||||
|
|
||||||
|
if item.extra:
|
||||||
|
searchShows(itemlist, item, texto)
|
||||||
|
else:
|
||||||
|
searchMovies(itemlist, item, texto)
|
||||||
|
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
def by(item, pattern):
|
||||||
|
logger.info()
|
||||||
|
itemlist = []
|
||||||
|
|
||||||
|
#descarga la pagina html
|
||||||
|
data = load_data(item.url)
|
||||||
|
|
||||||
|
#patron para buscar en la pagina
|
||||||
|
pattern = '<li class="cat-item cat-item-\d+"><a href="([^"]+)" >&&</a>'.replace('&&', pattern)
|
||||||
|
|
||||||
|
matches = scrapertools.find_multiple_matches(data, pattern)
|
||||||
|
for link, genre in matches:
|
||||||
|
itemlist.append(Item(channel = __channel__, title=genre, url=link, action="movies"))
|
||||||
|
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
def genre(item):
|
||||||
|
return by(item, '(\D+)')
|
||||||
|
|
||||||
|
def age(item):
|
||||||
|
return by(item, '(\d+)')
|
||||||
|
|
||||||
|
def GKPluginLink(hash):
|
||||||
|
re = requests.post('https://player4.cuevana2.com/plugins/gkpluginsphp.php', dict(link=hash))
|
||||||
|
|
||||||
|
return re.json()['link'] if re.content else ''
|
||||||
|
|
||||||
|
#el pattern esta raro para eliminar los duplicados, de todas formas asi es un lenguaje de programacion verificando su sintaxis
|
||||||
|
def getContentMovie(data, item):
|
||||||
|
item.infoLabels["year"] = scrapertools.find_single_match(data, 'rel="tag">(\d+)</a>')
|
||||||
|
genre = ''
|
||||||
|
for found_genre in scrapertools.find_multiple_matches(data, 'genero/.*?">(.*?)</a>(?=.*?</p>)'):
|
||||||
|
genre += found_genre + ', '
|
||||||
|
item.infoLabels["genre"] = genre.strip(', ')
|
||||||
|
|
||||||
|
director = ''
|
||||||
|
for found_director in scrapertools.find_multiple_matches(data, 'director/.*?">(.*?)</a>(?=.*?</p>)'):
|
||||||
|
director += found_director + ', '
|
||||||
|
item.infoLabels["director"] = director.strip(', ')
|
||||||
|
|
||||||
|
item.infoLabels["cast"] = tuple(found_cast for found_cast in scrapertools.find_multiple_matches(
|
||||||
|
data, 'reparto/.*?">(.*?)</a>(?=.*?</p>)'))
|
||||||
|
|
||||||
|
def getContentShow(data, item):
|
||||||
|
item.thumbnail = scrapertools.find_single_match(data, 'width="120" height="160" src="([^"]+)"')
|
||||||
|
item.infoLabels['genre'] = scrapertools.find_single_match(data, '-4px;">(.*?)</div>')
|
||||||
|
|
||||||
|
def findvideos(item):
|
||||||
|
logger.info()
|
||||||
|
itemlist = []
|
||||||
|
|
||||||
|
data = load_data(item.url)
|
||||||
|
if item.extra:
|
||||||
|
getContentShow(data, item)
|
||||||
|
else:
|
||||||
|
getContentMovie(data, item)
|
||||||
|
pattern = '<iframe width="650" height="450" scrolling="no" src="([^"]+)'
|
||||||
|
subtitles = scrapertools.find_single_match(data, '<iframe width="650" height="450" scrolling="no" src=".*?sub=([^"]+)"')
|
||||||
|
|
||||||
|
#itemlist.append(Item(channel = __channel__, title=item.url))
|
||||||
|
for link in scrapertools.find_multiple_matches(data, pattern):
|
||||||
|
#php.*?=(\w+)&
|
||||||
|
#url=(.*?)&
|
||||||
|
if 'player4' in link:
|
||||||
|
if r'ir.php' in link:
|
||||||
|
link = scrapertools.find_single_match(link, 'php\?url=(.*?)&').replace('%3A', ':').replace('%2F', '/')
|
||||||
|
logger.info("CUEVANA IR %s" % link)
|
||||||
|
elif r'gdv.php' in link:
|
||||||
|
# google drive hace lento la busqueda de links, ademas no es tan buena opcion y es el primero que eliminan
|
||||||
|
continue
|
||||||
|
else:
|
||||||
|
link = scrapertools.find_single_match(link, 'php.*?=(\w+)&')
|
||||||
|
link = GKPluginLink(link)
|
||||||
|
if not link:
|
||||||
|
continue
|
||||||
|
|
||||||
|
title = "[COLOR blue]Servidor [%s][/COLOR]"
|
||||||
|
elif 'youtube' in link:
|
||||||
|
title = "[COLOR yellow]Ver Trailer (%s)[/COLOR]"
|
||||||
|
else: # En caso de que exista otra cosa no implementada, reportar si no aparece pelicula
|
||||||
|
continue
|
||||||
|
|
||||||
|
# GKplugin puede devolver multiples links con diferentes calidades, si se pudiera colocar una lista de opciones
|
||||||
|
# personalizadas para Directo, se agradece, por ahora solo devuelve el primero que encuentre
|
||||||
|
if type(link) is list:
|
||||||
|
link = link[0]['link']
|
||||||
|
|
||||||
|
itemlist.append(
|
||||||
|
item.clone(
|
||||||
|
channel = item.channel,
|
||||||
|
title=title,
|
||||||
|
url=link, action='play',
|
||||||
|
subtitle=subtitles))
|
||||||
|
|
||||||
|
itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server.capitalize())
|
||||||
|
autoplay.start(itemlist, item)
|
||||||
|
|
||||||
|
if config.get_videolibrary_support() and len(itemlist):
|
||||||
|
itemlist.append(Item(channel=item.channel, title="Añadir a la videoteca", text_color="green",
|
||||||
|
action="add_pelicula_to_library", url=item.url, thumbnail = item.thumbnail,
|
||||||
|
fulltitle = item.fulltitle
|
||||||
|
))
|
||||||
|
return itemlist
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"id": "cuevana2espanol",
|
||||||
|
"name": "Cuevana2español",
|
||||||
|
"active": true,
|
||||||
|
"adult": false,
|
||||||
|
"language": ["lat"],
|
||||||
|
"thumbnail": "cuevana2espanol.png",
|
||||||
|
"categories": [
|
||||||
|
"movie"
|
||||||
|
],
|
||||||
|
"settings": [
|
||||||
|
{
|
||||||
|
"id": "modo_grafico",
|
||||||
|
"type": "bool",
|
||||||
|
"label": "Buscar información extra",
|
||||||
|
"default": true,
|
||||||
|
"enabled": true,
|
||||||
|
"visible": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "include_in_global_search",
|
||||||
|
"type": "bool",
|
||||||
|
"label": "Incluir en busqueda global",
|
||||||
|
"default": true,
|
||||||
|
"enabled": true,
|
||||||
|
"visible": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,187 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
import re
|
||||||
|
from channelselector import get_thumb
|
||||||
|
|
||||||
|
from core.item import Item
|
||||||
|
from core import httptools
|
||||||
|
from core import scrapertools
|
||||||
|
from core import servertools
|
||||||
|
from platformcode import config, logger
|
||||||
|
from channels import autoplay
|
||||||
|
from lib import requests
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
host = "http://cuevana2espanol.com/"
|
||||||
|
__channel__ = "cuevana2espanol"
|
||||||
|
list_quality = []
|
||||||
|
list_servers = ['rapidvideo', 'streamango', 'directo', 'yourupload', 'openload', 'dostream']
|
||||||
|
|
||||||
|
def load_data(url):
|
||||||
|
data = httptools.downloadpage(url).data
|
||||||
|
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||||
|
|
||||||
|
return data
|
||||||
|
|
||||||
|
def mainlist(item):
|
||||||
|
itemlist = []
|
||||||
|
|
||||||
|
autoplay.init(item.channel, list_servers, list_quality)
|
||||||
|
itemlist.append(Item(channel = item.channel, title = "Novedades", action = "movies",
|
||||||
|
url = host + "ver-pelicula-online", thumbnail = get_thumb("newest", auto = True)))
|
||||||
|
itemlist.append(Item(channel = item.channel, title = "Favoritas", action = "movies",
|
||||||
|
url = host + "calificaciones", thumbnail = get_thumb("favorites", auto = True) ))
|
||||||
|
itemlist.append(Item(channel = item.channel, title = "Destacadas", action = "movies",
|
||||||
|
url = host + "tendencias", thumbnail = get_thumb("hot", auto = True)))
|
||||||
|
itemlist.append(Item(channel = item.channel, title = "Ranking IMDB", action = "moviesIMDB",
|
||||||
|
url = host + "raking-imdb", thumbnail = get_thumb("hot", auto = True) ))
|
||||||
|
itemlist.append(Item(channel = item.channel, title = ""))
|
||||||
|
itemlist.append(Item(channel = item.channel, title = "Buscar...", action = "search",
|
||||||
|
url = host + "?s=", thumbnail = get_thumb("search", auto = True)))
|
||||||
|
|
||||||
|
autoplay.show_option(item.channel, itemlist)
|
||||||
|
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
def movies(item):
|
||||||
|
itemlist = []
|
||||||
|
|
||||||
|
data = load_data(item.url)
|
||||||
|
pattern = 'class="poster"><img src="([^"]+)" alt="([^"]+)".*?'
|
||||||
|
pattern += '</span> (.*?)</div>.*?'
|
||||||
|
pattern += 'href="([^"]+)".*?'
|
||||||
|
pattern += '<span>(\d+)</span>.*?'
|
||||||
|
|
||||||
|
matches = scrapertools.find_multiple_matches(data, pattern)
|
||||||
|
for img, title, ranking, link, age in matches:
|
||||||
|
itemTitle = "%s [COLOR yellow](%s)[/COLOR] [COLOR blue](%s)[/COLOR]" % (title, ranking, age)
|
||||||
|
itemlist.append(Item(channel = __channel__, title=itemTitle, fulltitle=title, thumbnail=img,
|
||||||
|
url=link, action="findvideos"))
|
||||||
|
|
||||||
|
next_page = scrapertools.find_single_match(data, 'href="([^"]+)" ><span class="icon-chevron-right">')
|
||||||
|
if next_page:
|
||||||
|
itemlist.append(Item(channel = __channel__, title="Siguiente Pagina",
|
||||||
|
url=next_page, action="movies"))
|
||||||
|
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
def moviesIMDB(item):
|
||||||
|
itemlist = []
|
||||||
|
|
||||||
|
data = load_data(item.url)
|
||||||
|
pattern = '"poster"><a href="([^"]+)"><img src="([^"]+)".*?'
|
||||||
|
pattern += 'class="puesto">(\d+)</div>.*?'
|
||||||
|
pattern += '"rating">(.*?)</div>.*?'
|
||||||
|
pattern += '"title">.*?>(.*?)</a>'
|
||||||
|
|
||||||
|
matches = scrapertools.find_multiple_matches(data, pattern)
|
||||||
|
for link, img, rank, rating, title in matches:
|
||||||
|
itemTitle = "%s [COLOR blue](#%s)[/COLOR] [COLOR yellow](%s)[/COLOR]" % (title, rank, rating)
|
||||||
|
img = img.replace('-90x135', '')
|
||||||
|
|
||||||
|
itemlist.append(Item(channel = __channel__, title=itemTitle, fulltitle=title, thumbnail=img,
|
||||||
|
url=link, action="findvideos"))
|
||||||
|
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
def searchMovies(item):
|
||||||
|
itemlist = []
|
||||||
|
|
||||||
|
data = load_data(item.url)
|
||||||
|
pattern = 'class="image">.*?href="([^"]+)".*?'
|
||||||
|
pattern += 'src="([^"]+)" alt="([^"]+)".*?'
|
||||||
|
pattern += 'class="year">(\d+)</span>.*?'
|
||||||
|
pattern += '<p>(.*?)</p>'
|
||||||
|
|
||||||
|
matches = scrapertools.find_multiple_matches(data, pattern)
|
||||||
|
for link, img, title, year, plot in matches:
|
||||||
|
itemTitle = "%s [COLOR blue](%s)[/COLOR]" % (title, year)
|
||||||
|
|
||||||
|
itemlist.append(Item(channel = __channel__, title=itemTitle, fulltitle=title, thumbnail=img,
|
||||||
|
url=link, plot=plot, action="findvideos"))
|
||||||
|
|
||||||
|
next_page = scrapertools.find_single_match(data, 'href="([^"]+)" ><span class="icon-chevron-right">')
|
||||||
|
if next_page:
|
||||||
|
itemlist.append(Item(channel = __channel__, title="Siguiente Pagina",
|
||||||
|
url=next_page, action="searchMovies"))
|
||||||
|
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
def search(item, text):
|
||||||
|
text = text.lower().replace(' ', '+')
|
||||||
|
item.url += text
|
||||||
|
|
||||||
|
return searchMovies(item)
|
||||||
|
|
||||||
|
def GKPluginLink(hash):
|
||||||
|
re = requests.post('https://player4.cuevana2.com/plugins/gkpluginsphp.php', dict(link=hash))
|
||||||
|
|
||||||
|
return re.json()['link'] if re.content else ''
|
||||||
|
|
||||||
|
def getContent(item, data):
|
||||||
|
item.infoLabels["year"] = scrapertools.find_single_match(data, 'class="date">.*?(\d+)</span>')
|
||||||
|
item.plot = scrapertools.find_single_match(data, 'class="wp-content"><p>(.*?)</p>')
|
||||||
|
genres = ''
|
||||||
|
for genre in scrapertools.find_multiple_matches(data, '/genero/.*?"tag">(.*?)</a>'):
|
||||||
|
genres += genre + ', '
|
||||||
|
|
||||||
|
item.infoLabels['genre'] = genres.strip(', ')
|
||||||
|
|
||||||
|
def findvideos(item):
|
||||||
|
logger.info()
|
||||||
|
itemlist = []
|
||||||
|
|
||||||
|
data = load_data(item.url)
|
||||||
|
getContent(item, data)
|
||||||
|
"""
|
||||||
|
if item.extra:
|
||||||
|
getContentShow(data, item)
|
||||||
|
else:
|
||||||
|
getContentMovie(data, item)
|
||||||
|
"""
|
||||||
|
pattern = '<iframe class="metaframe rptss" src="([^"]+)"'
|
||||||
|
|
||||||
|
#itemlist.append(Item(channel = __channel__, title=item.url))
|
||||||
|
for link in scrapertools.find_multiple_matches(data, pattern):
|
||||||
|
#php.*?=(\w+)&
|
||||||
|
#url=(.*?)&
|
||||||
|
if 'player4' in link:
|
||||||
|
logger.info("CUEVANA LINK %s" % link)
|
||||||
|
if r'ir.php' in link:
|
||||||
|
link = scrapertools.find_single_match(link, 'php.*?=(.*)').replace('%3A', ':').replace('%2F', '/')
|
||||||
|
logger.info("CUEVANA IR %s" % link)
|
||||||
|
elif r'gdv.php' in link:
|
||||||
|
# google drive hace lento la busqueda de links, ademas no es tan buena opcion y es el primero que eliminan
|
||||||
|
continue
|
||||||
|
else:
|
||||||
|
link = scrapertools.find_single_match(link, 'php.*?=(\w+)')
|
||||||
|
link = GKPluginLink(link)
|
||||||
|
if not link:
|
||||||
|
continue
|
||||||
|
|
||||||
|
title = "[COLOR blue]Servidor [%s][/COLOR]"
|
||||||
|
elif 'youtube' in link:
|
||||||
|
title = "[COLOR yellow]Ver Trailer (%s)[/COLOR]"
|
||||||
|
else: # En caso de que exista otra cosa no implementada, reportar si no aparece pelicula
|
||||||
|
continue
|
||||||
|
|
||||||
|
# GKplugin puede devolver multiples links con diferentes calidades, si se pudiera colocar una lista de opciones
|
||||||
|
# personalizadas para Directo, se agradece, por ahora solo devuelve el primero que encuentre
|
||||||
|
if type(link) is list:
|
||||||
|
link = link[0]['link']
|
||||||
|
|
||||||
|
itemlist.append(
|
||||||
|
item.clone(
|
||||||
|
channel = item.channel,
|
||||||
|
title=title,
|
||||||
|
url=link, action='play'))
|
||||||
|
|
||||||
|
itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server.capitalize())
|
||||||
|
autoplay.start(itemlist, item)
|
||||||
|
|
||||||
|
if config.get_videolibrary_support() and len(itemlist):
|
||||||
|
itemlist.append(Item(channel=item.channel, title="Añadir a la videoteca", text_color="green",
|
||||||
|
action="add_pelicula_to_library", url=item.url, thumbnail = item.thumbnail,
|
||||||
|
fulltitle = item.fulltitle
|
||||||
|
))
|
||||||
|
return itemlist
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 6.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
Reference in New Issue
Block a user