@@ -134,8 +134,7 @@ def novedades_episodios(item):
|
||||
contentTitle = scrapedtitle.replace('#' + episodio, '')
|
||||
|
||||
itemlist.append(Item(channel=item.channel, action="findvideos", title=scrapedtitle, url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail, plot=scrapedplot,
|
||||
hasContentDetails=True, contentSeason=1, contentTitle=contentTitle))
|
||||
thumbnail=scrapedthumbnail, plot=scrapedplot, contentSeason=1, contentTitle=contentTitle))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -89,7 +89,6 @@ def start(itemlist, item):
|
||||
videoitem.contentTitle=item.contentTitle
|
||||
videoitem.contentType=item.contentType
|
||||
videoitem.episode_id=item.episode_id
|
||||
videoitem.hasContentDetails=item.hasContentDetails
|
||||
#videoitem.infoLabels=item.infoLabels
|
||||
videoitem.thumbnail=item.thumbnail
|
||||
#videoitem.title=item.title
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"id": "bityouth",
|
||||
"name": "Bityouth",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["cast"],
|
||||
"thumbnail": "http://s6.postimg.org/6ash180up/bityoulogo.png",
|
||||
"banner": "bityouth.png",
|
||||
"categories": [
|
||||
"torrent",
|
||||
"movie",
|
||||
"tvshow"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Incluir en busqueda global",
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"id": "borrachodetorrent",
|
||||
"name": "BorrachodeTorrent",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["cast"],
|
||||
"thumbnail": "http://imgur.com/BePrYmy.png",
|
||||
"categories": [
|
||||
"torrent",
|
||||
"movie",
|
||||
"tvshow"
|
||||
],
|
||||
"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
|
||||
}
|
||||
]
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"id": "bricocine",
|
||||
"name": "Bricocine",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["cast"],
|
||||
"thumbnail": "http://s6.postimg.org/9u8m1ep8x/bricocine.jpg",
|
||||
"banner": "bricocine.png",
|
||||
"categories": [
|
||||
"torrent",
|
||||
"movie",
|
||||
"tvshow"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Incluir en busqueda global",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -10,7 +10,7 @@ from core import tmdb
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
|
||||
host = 'http://cinefoxtv.net/'
|
||||
host = 'http://verhdpelis.com/'
|
||||
headers = [['User-Agent', 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0'],
|
||||
['Referer', host]]
|
||||
|
||||
|
||||
@@ -114,7 +114,9 @@ def lista(item):
|
||||
itemlist.append(item.clone(title="Estrenos", action="entradas", url="%s/peliculas/estrenos" % host))
|
||||
itemlist.append(item.clone(title="Dvdrip", action="entradas", url="%s/peliculas/dvdrip" % host))
|
||||
itemlist.append(item.clone(title="HD (720p/1080p)", action="entradas", url="%s/peliculas/hd" % host))
|
||||
itemlist.append(item.clone(title="4K", action="entradas", url="%s/peliculas/4k" % host))
|
||||
itemlist.append(item.clone(title="HDRIP", action="entradas", url="%s/peliculas/hdrip" % host))
|
||||
|
||||
itemlist.append(item.clone(title="Latino", action="entradas",
|
||||
url="%s/peliculas/latino-peliculas" % host))
|
||||
itemlist.append(item.clone(title="VOSE", action="entradas", url="%s/peliculas/subtituladas" % host))
|
||||
|
||||
@@ -225,6 +225,8 @@ def findvideos(item):
|
||||
#itemlist = get_url(item)
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r'"|\n|\r|\t| |<br>|\s{2,}', "", data)
|
||||
url_m3u8 = scrapertools.find_single_match(data, '<source src=(.*?) type=application/x-mpegURL\s*/>')
|
||||
itemlist.append(item.clone(url=url_m3u8, action='play'))
|
||||
patron = 'id=(tab\d+)><div class=movieplay><(?:iframe|script) src=(.*?)(?:scrolling|><\/script>)'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
|
||||
@@ -72,7 +72,6 @@ def peliculas(item):
|
||||
url = scrapedurl,
|
||||
thumbnail = scrapedthumbnail,
|
||||
plot = plot,
|
||||
hasContentDetails = True,
|
||||
contentTitle = scrapedtitle,
|
||||
contentType = "movie",
|
||||
language=language,
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
{
|
||||
"id": "ohlatino",
|
||||
"name": "OH!Latino",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["lat"],
|
||||
"thumbnail": "http://cinemiltonero.com/wp-content/uploads/2017/08/logo-Latino0.png",
|
||||
"banner": "https://s27.postimg.org/bz0fh8jpf/oh-pelis-banner.png",
|
||||
"categories": [
|
||||
"movie"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Incluir en busqueda global",
|
||||
"default": false,
|
||||
"enabled": false,
|
||||
"visible": false
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_latino",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - Latino",
|
||||
"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_infantiles",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - Infantiles",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,206 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# -*- Channel OH!Latino -*-
|
||||
# -*- Created for Alfa-addon -*-
|
||||
# -*- By the Alfa Develop Group -*-
|
||||
|
||||
import re
|
||||
|
||||
from channelselector import get_thumb
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from core import servertools
|
||||
from core import tmdb
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
|
||||
host = 'http://www.ohpeliculas.com'
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(host).data
|
||||
patron = '<li class="cat-item cat-item-\d+"><a href="(.*?)" >(.*?)<\/a> <i>(\d+)<\/i>'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
mcantidad = 0
|
||||
for scrapedurl, scrapedtitle, cantidad in matches:
|
||||
mcantidad += int(cantidad)
|
||||
|
||||
itemlist.append(
|
||||
item.clone(title="Peliculas",
|
||||
action='movies_menu'
|
||||
))
|
||||
|
||||
itemlist.append(
|
||||
item.clone(title="Buscar",
|
||||
action="search",
|
||||
url=host+'?s=',
|
||||
))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def movies_menu(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
|
||||
itemlist.append(
|
||||
item.clone(title="Todas",
|
||||
action="list_all",
|
||||
url=host
|
||||
))
|
||||
|
||||
itemlist.append(
|
||||
item.clone(title="Generos",
|
||||
action="section",
|
||||
url=host, extra='genres'))
|
||||
|
||||
itemlist.append(
|
||||
item.clone(title="Por año",
|
||||
action="section",
|
||||
url=host, extra='byyear'
|
||||
))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def get_source(url):
|
||||
logger.info()
|
||||
data = httptools.downloadpage(url).data
|
||||
data = re.sub(r'"|\n|\r|\t| |<br>|\s{2,}', "", data)
|
||||
return data
|
||||
|
||||
def list_all(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
data = get_source(item.url)
|
||||
patron = '<div id=mt-.*? class=item>.*?<a href=(.*?)><div class=image>.*?'
|
||||
patron +='<img src=(.*?) alt=.*?span class=tt>(.*?)<.*?ttx>(.*?)'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedurl, scrapedthumbnail, scrapedtitle, scrapedplot in matches:
|
||||
url = scrapedurl
|
||||
action = 'findvideos'
|
||||
thumbnail = scrapedthumbnail
|
||||
contentTitle = scrapedtitle
|
||||
plot = scrapedplot
|
||||
title = contentTitle
|
||||
|
||||
filtro_thumb = scrapedthumbnail.replace("https://image.tmdb.org/t/p/w185", "")
|
||||
filtro_list = {"poster_path": filtro_thumb}
|
||||
filtro_list = filtro_list.items()
|
||||
|
||||
itemlist.append(Item(channel=item.channel,
|
||||
action=action,
|
||||
title=title,
|
||||
url=url,
|
||||
plot=plot,
|
||||
thumbnail=thumbnail,
|
||||
contentTitle=contentTitle,
|
||||
infoLabels={'filtro': filtro_list}
|
||||
))
|
||||
#tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
# Paginacion
|
||||
|
||||
if itemlist != []:
|
||||
actual_page_url = item.url
|
||||
next_page = scrapertools.find_single_match(data,
|
||||
'alignleft><a href=(.*?) ><\/a><\/div><div class=nav-next alignright>')
|
||||
if next_page != '':
|
||||
itemlist.append(Item(channel=item.channel,
|
||||
action="list_all",
|
||||
title='Siguiente >>>',
|
||||
url=next_page,
|
||||
thumbnail='https://s16.postimg.org/9okdu7hhx/siguiente.png'
|
||||
))
|
||||
return itemlist
|
||||
|
||||
|
||||
def section(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
duplicated =[]
|
||||
data = httptools.downloadpage(item.url).data
|
||||
if item.extra == 'genres':
|
||||
patron = '<li class="cat-item cat-item-.*?><a href="(.*?)" >(.*?)<\/a>'
|
||||
elif item.extra == 'byyear':
|
||||
patron = '<a href="([^"]+)">(\d{4})<\/a><\/li>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
title = scrapedtitle
|
||||
url = scrapedurl
|
||||
if url not in duplicated:
|
||||
itemlist.append(Item(channel=item.channel,
|
||||
action='list_all',
|
||||
title=title,
|
||||
url=url
|
||||
))
|
||||
duplicated.append(url)
|
||||
return itemlist
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
logger.info()
|
||||
texto = texto.replace(" ", "+")
|
||||
item.url = item.url + texto
|
||||
if texto != '':
|
||||
return list_all(item)
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
itemlist.extend(servertools.find_video_items(data=data))
|
||||
for videoitem in itemlist:
|
||||
videoitem.channel = item.channel
|
||||
videoitem.contentTitle = item.fulltitle
|
||||
videoitem.infoLabels = item.infoLabels
|
||||
if videoitem.server != 'youtube':
|
||||
videoitem.title = item.title + ' (%s)' % videoitem.server
|
||||
else:
|
||||
videoitem.title = 'Trailer en %s' % videoitem.server
|
||||
videoitem.action = 'play'
|
||||
videoitem.server = ""
|
||||
|
||||
if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra != 'findvideos':
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
title='[COLOR yellow]Añadir esta pelicula a la videoteca[/COLOR]',
|
||||
url=item.url,
|
||||
action="add_pelicula_to_library",
|
||||
extra="findvideos",
|
||||
))
|
||||
tmdb.set_infoLabels(itemlist, True)
|
||||
itemlist = servertools.get_servers_itemlist(itemlist)
|
||||
return itemlist
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
logger.info()
|
||||
item = Item()
|
||||
try:
|
||||
if categoria in ['peliculas','latino']:
|
||||
item.url = host + '/release/2017/'
|
||||
|
||||
elif categoria == 'infantiles':
|
||||
item.url = host + '/genero/infantil/'
|
||||
|
||||
itemlist = list_all(item)
|
||||
if itemlist[-1].title == '>> Página siguiente':
|
||||
itemlist.pop()
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
def play(item):
|
||||
logger.info()
|
||||
item.thumbnail = item.contentThumbnail
|
||||
return [item]
|
||||
@@ -16,19 +16,6 @@ def mainlist(item):
|
||||
item.url = "http://www.pelispekes.com/"
|
||||
|
||||
data = scrapertools.cachePage(item.url)
|
||||
'''
|
||||
<div class="poster-media-card">
|
||||
<a href="http://www.pelispekes.com/un-gallo-con-muchos-huevos/" title="Un gallo con muchos Huevos">
|
||||
<div class="poster">
|
||||
<div class="title">
|
||||
<span class="under-title">Animacion</span>
|
||||
</div>
|
||||
<span class="rating">
|
||||
<i class="glyphicon glyphicon-star"></i><span class="rating-number">6.2</span>
|
||||
</span>
|
||||
<div class="poster-image-container">
|
||||
<img width="300" height="428" src="http://image.tmdb.org/t/p/w185/cz3Kb6Xa1q0uCrsTIRDS7fYOZyw.jpg" title="Un gallo con muchos Huevos" alt="Un gallo con muchos Huevos"/>
|
||||
'''
|
||||
patron = '<div class="poster-media-card"[^<]+'
|
||||
patron += '<a href="([^"]+)" title="([^"]+)"[^<]+'
|
||||
patron += '<div class="poster"[^<]+'
|
||||
@@ -51,7 +38,7 @@ def mainlist(item):
|
||||
logger.debug("title=[" + title + "], url=[" + url + "], thumbnail=[" + thumbnail + "]")
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, action="findvideos", title=title, url=url, thumbnail=thumbnail, fanart=thumbnail,
|
||||
plot=plot, hasContentDetails=True, contentTitle=title, contentThumbnail=thumbnail))
|
||||
plot=plot, contentTitle=title, contentThumbnail=thumbnail))
|
||||
|
||||
# Extrae la pagina siguiente
|
||||
next_page_url = scrapertools.find_single_match(data,
|
||||
@@ -65,14 +52,6 @@ def mainlist(item):
|
||||
|
||||
def findvideos(item):
|
||||
logger.info("item=" + item.tostring())
|
||||
|
||||
'''
|
||||
<h2>Sinopsis</h2>
|
||||
<p>Para que todo salga bien en la prestigiosa Academia Werth, la pequeña y su madre se mudan a una casa nueva. La pequeña es muy seria y madura para su edad y planea estudiar durante las vacaciones siguiendo un estricto programa organizado por su madre; pero sus planes son perturbados por un vecino excéntrico y generoso. Él le enseña un mundo extraordinario en donde todo es posible. Un mundo en el que el Aviador se topó alguna vez con el misterioso Principito. Entonces comienza la aventura de la pequeña en el universo del Principito. Y así descubre nuevamente su infancia y comprenderá que sólo se ve bien con el corazón. Lo esencial es invisible a los ojos. Adaptación de la novela homónima de Antoine de Saint-Exupery.</p>
|
||||
<div
|
||||
'''
|
||||
|
||||
# Descarga la página para obtener el argumento
|
||||
data = scrapertools.cachePage(item.url)
|
||||
data = data.replace("www.pelispekes.com/player/tune.php?nt=", "netu.tv/watch_video.php?v=")
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
import urllib
|
||||
import unicodedata
|
||||
|
||||
from core import channeltools
|
||||
from core import httptools
|
||||
@@ -11,7 +13,11 @@ from core.item import Item
|
||||
from platformcode import config, logger
|
||||
|
||||
idiomas1 = {"/es.png":"CAST","/en_es.png":"VOSE","/la.png":"LAT","/en.png":"ENG"}
|
||||
HOST = 'http://www.yaske.ro'
|
||||
domain = "yaske.ro"
|
||||
HOST = "http://www." + domain
|
||||
HOST_MOVIES = "http://peliculas." + domain + "/now_playing/"
|
||||
HOST_TVSHOWS = "http://series." + domain + "/popular/"
|
||||
HOST_TVSHOWS_TPL = "http://series." + domain + "/tpl"
|
||||
parameters = channeltools.get_channel_parameters('yaske')
|
||||
fanart_host = parameters['fanart']
|
||||
thumbnail_host = parameters['thumbnail']
|
||||
@@ -26,38 +32,140 @@ def mainlist(item):
|
||||
item.fanart = fanart_host
|
||||
thumbnail = "https://raw.githubusercontent.com/master-1970/resources/master/images/genres/4/verdes/%s.png"
|
||||
|
||||
itemlist.append(item.clone(title="Novedades", action="peliculas", text_bold=True, viewcontent='movies',
|
||||
url=HOST,
|
||||
itemlist.append(item.clone(title="Peliculas", text_bold=True, viewcontent='movies',
|
||||
thumbnail=thumbnail % 'novedades', viewmode="movie_with_plot"))
|
||||
itemlist.append(item.clone(title="Estrenos", action="peliculas", text_bold=True,
|
||||
itemlist.append(item.clone(title=" Novedades", action="peliculas", viewcontent='movies',
|
||||
url=HOST_MOVIES,
|
||||
thumbnail=thumbnail % 'novedades', viewmode="movie_with_plot"))
|
||||
itemlist.append(item.clone(title=" Estrenos", action="peliculas",
|
||||
url=HOST + "/premiere", thumbnail=thumbnail % 'estrenos'))
|
||||
itemlist.append(item.clone(title="Género", action="menu_buscar_contenido", text_bold=True,thumbnail=thumbnail % 'generos', viewmode="thumbnails",
|
||||
itemlist.append(item.clone(title=" Género", action="menu_buscar_contenido", thumbnail=thumbnail % 'generos', viewmode="thumbnails",
|
||||
url=HOST
|
||||
))
|
||||
itemlist.append(item.clone(title=" Buscar película", action="search", thumbnail=thumbnail % 'buscar',
|
||||
type = "movie" ))
|
||||
|
||||
itemlist.append(item.clone(title="", folder=False))
|
||||
itemlist.append(item.clone(title="Buscar por título", action="search", thumbnail=thumbnail % 'buscar'))
|
||||
itemlist.append(item.clone(title="Series", text_bold=True, viewcontent='movies',
|
||||
thumbnail=thumbnail % 'novedades', viewmode="movie_with_plot"))
|
||||
itemlist.append(item.clone(title=" Novedades", action="series", viewcontent='movies',
|
||||
url=HOST_TVSHOWS,
|
||||
thumbnail=thumbnail % 'novedades', viewmode="movie_with_plot"))
|
||||
itemlist.append(item.clone(title=" Buscar serie", action="search", thumbnail=thumbnail % 'buscar',
|
||||
type = "tvshow" ))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def series(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
url_p = scrapertools.find_single_match(item.url, '(.*?).page=')
|
||||
page = scrapertools.find_single_match(item.url, 'page=([0-9]+)')
|
||||
if not page:
|
||||
page = 1
|
||||
url_p = item.url
|
||||
else:
|
||||
page = int(page) + 1
|
||||
if "search" in item.url:
|
||||
url_p += "&page=%s" %page
|
||||
else:
|
||||
url_p += "?page=%s" %page
|
||||
data = httptools.downloadpage(url_p).data
|
||||
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
|
||||
patron = '(?s)class="post-item-image btn-play-item".*?'
|
||||
patron += 'href="(http://series[^"]+)">.*?'
|
||||
patron += '<img data-original="([^"]+)".*?'
|
||||
patron += 'glyphicon-play-circle"></i>([^<]+).*?'
|
||||
patron += 'glyphicon-calendar"></i>([^<]+).*?'
|
||||
patron += 'text-muted f-14">(.*?)</h3'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
for scrapedurl, scrapedthumbnail, scrapedepisodes, year, scrapedtitle in matches:
|
||||
scrapedepisodes.strip()
|
||||
year = year.strip()
|
||||
contentTitle = scrapertools.htmlclean(scrapedtitle.strip())
|
||||
title = "%s (%s)" %(contentTitle, scrapedepisodes)
|
||||
if "series" in scrapedurl:
|
||||
itemlist.append(Item(channel=item.channel, action="temporadas", title=title, url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail, show=contentTitle,
|
||||
infoLabels={"year": year}, text_color=color1))
|
||||
# Obtenemos los datos basicos de todas las peliculas mediante multihilos
|
||||
tmdb.set_infoLabels(itemlist, True)
|
||||
|
||||
# Si es necesario añadir paginacion
|
||||
patron_next_page = 'href="([^"]+)">\s*»'
|
||||
matches_next_page = scrapertools.find_single_match(data, patron_next_page)
|
||||
if matches_next_page and len(itemlist)>0:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, action="series", title=">> Página siguiente", thumbnail=thumbnail_host,
|
||||
url=url_p, folder=True, text_color=color3, text_bold=True))
|
||||
return itemlist
|
||||
|
||||
|
||||
def temporadas(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
post = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
patron = 'media-object" src="([^"]+).*?'
|
||||
patron += 'media-heading">([^<]+).*?'
|
||||
patron += '<code>(.*?)</div>'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
for scrapedthumbnail, scrapedtitle, scrapedcapitulos in matches:
|
||||
id = scrapertools.find_single_match(item.url, "yaske.ro/([0-9]+)")
|
||||
season = scrapertools.find_single_match(scrapedtitle, "[0-9]+")
|
||||
title = scrapedtitle + " (%s)" %scrapedcapitulos.replace("</code>","").replace("\n","")
|
||||
post = {"data[season]" : season, "data[id]" : id, "name" : "list_episodes" , "both" : "0", "type" : "template"}
|
||||
post = urllib.urlencode(post)
|
||||
item.infoLabels["season"] = season
|
||||
itemlist.append(item.clone(action = "capitulos",
|
||||
post = post,
|
||||
title = title,
|
||||
url = HOST_TVSHOWS_TPL
|
||||
))
|
||||
tmdb.set_infoLabels(itemlist)
|
||||
return itemlist
|
||||
|
||||
|
||||
def capitulos(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url, post=item.post).data
|
||||
data = data.replace("<wbr>","")
|
||||
patron = 'href=."([^"]+).*?'
|
||||
patron += 'media-heading.">([^<]+).*?'
|
||||
patron += 'fecha de emisi.*?: ([^<]+)'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
for scrapedurl, scrapedtitle, scrapeddate in matches:
|
||||
scrapedtitle = scrapedtitle + " (%s)" %scrapeddate
|
||||
episode = scrapertools.find_single_match(scrapedurl, "capitulo-([0-9]+)")
|
||||
query = item.show + " " + str(item.infoLabels["season"]) + "x" + episode.rjust(2, "0")
|
||||
item.infoLabels["episode"] = episode
|
||||
itemlist.append(item.clone(action = "findvideos",
|
||||
title = scrapedtitle.decode("unicode-escape"),
|
||||
query = query.replace(" ","+"),
|
||||
url = scrapedurl.replace("\\","")
|
||||
))
|
||||
tmdb.set_infoLabels(itemlist)
|
||||
return itemlist
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
|
||||
try:
|
||||
item.url = HOST + "/search/?query=" + texto.replace(' ', '+')
|
||||
item.extra = ""
|
||||
itemlist.extend(peliculas(item))
|
||||
if item.type == "movie":
|
||||
itemlist.extend(peliculas(item))
|
||||
else:
|
||||
itemlist.extend(series(item))
|
||||
if itemlist[-1].title == ">> Página siguiente":
|
||||
item_pag = itemlist[-1]
|
||||
itemlist = sorted(itemlist[:-1], key=lambda Item: Item.contentTitle)
|
||||
itemlist.append(item_pag)
|
||||
else:
|
||||
itemlist = sorted(itemlist, key=lambda Item: Item.contentTitle)
|
||||
|
||||
return itemlist
|
||||
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
@@ -77,7 +185,6 @@ def newest(categoria):
|
||||
item.url = HOST + "/genre/27/"
|
||||
else:
|
||||
return []
|
||||
|
||||
itemlist = peliculas(item)
|
||||
if itemlist[-1].title == ">> Página siguiente":
|
||||
itemlist.pop()
|
||||
@@ -95,8 +202,18 @@ def newest(categoria):
|
||||
def peliculas(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
url_p = scrapertools.find_single_match(item.url, '(.*?).page=')
|
||||
page = scrapertools.find_single_match(item.url, 'page=([0-9]+)')
|
||||
if not page:
|
||||
page = 1
|
||||
url_p = item.url
|
||||
else:
|
||||
page = int(page) + 1
|
||||
if "search" in item.url:
|
||||
url_p += "&page=%s" %page
|
||||
else:
|
||||
url_p += "?page=%s" %page
|
||||
data = httptools.downloadpage(url_p).data
|
||||
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
|
||||
patron = '(?s)class="post-item-image btn-play-item".*?'
|
||||
patron += 'href="([^"]+)">.*?'
|
||||
@@ -105,12 +222,8 @@ def peliculas(item):
|
||||
patron += 'post(.*?)</div.*?'
|
||||
patron += 'text-muted f-14">(.*?)</h3'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
patron_next_page = 'href="([^"]+)"> »'
|
||||
matches_next_page = scrapertools.find_single_match(data, patron_next_page)
|
||||
if len(matches_next_page) > 0:
|
||||
url_next_page = item.url + matches_next_page
|
||||
|
||||
for scrapedurl, scrapedthumbnail, year, idiomas, scrapedtitle in matches:
|
||||
query = scrapertools.find_single_match(scrapedurl, 'yaske.ro/[0-9]+/(.*?)/').replace("-","+")
|
||||
year = year.strip()
|
||||
patronidiomas = '<img src="([^"]+)"'
|
||||
matchesidiomas = scrapertools.find_multiple_matches(idiomas, patronidiomas)
|
||||
@@ -125,27 +238,26 @@ def peliculas(item):
|
||||
title = "%s %s" % (contentTitle, idiomas_disponibles)
|
||||
itemlist.append(Item(channel=item.channel, action="findvideos", title=title, url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail, contentTitle=contentTitle,
|
||||
infoLabels={"year": year}, text_color=color1))
|
||||
infoLabels={"year": year}, text_color=color1, query = query))
|
||||
# Obtenemos los datos basicos de todas las peliculas mediante multihilos
|
||||
tmdb.set_infoLabels(itemlist)
|
||||
|
||||
# Si es necesario añadir paginacion
|
||||
if matches_next_page:
|
||||
patron_next_page = 'href="([^"]+)">\s*»'
|
||||
matches_next_page = scrapertools.find_single_match(data, patron_next_page)
|
||||
if matches_next_page and len(itemlist)>0:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, action="peliculas", title=">> Página siguiente", thumbnail=thumbnail_host,
|
||||
url=url_next_page, folder=True, text_color=color3, text_bold=True))
|
||||
|
||||
url=url_p, folder=True, text_color=color3, text_bold=True))
|
||||
return itemlist
|
||||
|
||||
|
||||
def menu_buscar_contenido(item):
|
||||
logger.info(item)
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
patron = 'Generos.*?</ul>'
|
||||
data = scrapertools.find_single_match(data, patron)
|
||||
# Extrae las entradas
|
||||
patron = 'href="([^"]+)">([^<]+)'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
@@ -159,11 +271,7 @@ def menu_buscar_contenido(item):
|
||||
folder = True,
|
||||
viewmode = "movie_with_plot"
|
||||
))
|
||||
|
||||
if item.extra in ['genre', 'audio', 'year']:
|
||||
return sorted(itemlist, key=lambda i: i.title.lower(), reverse=item.extra == 'year')
|
||||
else:
|
||||
return itemlist
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
@@ -171,11 +279,10 @@ def findvideos(item):
|
||||
itemlist = []
|
||||
sublist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
mtmdb = scrapertools.find_single_match(item.url, 'yaske.ro/([0-9]+)')
|
||||
patron = '(?s)id="online".*?server="([^"]+)"'
|
||||
mserver = scrapertools.find_single_match(data, patron)
|
||||
url_m = "http://olimpo.link/?tmdb=%s&server=%s" %(mtmdb, mserver)
|
||||
patron = '/\?tmdb=[^"]+.*?domain=(?:www\.|)([^\.]+).*?text-overflow.*?href="([^"]+).*?'
|
||||
url_m = "http://olimpo.link/?q=%s&server=%s" %(item.query, mserver)
|
||||
patron = 'class="favicon.*?domain=(?:www\.|)([^\.]+).*?text-overflow.*?href="([^"]+).*?'
|
||||
patron += '\[([^\]]+)\].*?\[([^\]]+)\]'
|
||||
data = httptools.downloadpage(url_m).data
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
# --------------------------------------------------------------------------------
|
||||
# Item is the object we use for representing data
|
||||
# --------------------------------------------------------------------------------
|
||||
@@ -170,8 +170,6 @@ class Item(object):
|
||||
# Al modificar cualquiera de estos atributos content...
|
||||
if name in ["contentTitle", "contentPlot", "plot", "contentSerieName", "contentType", "contentEpisodeTitle",
|
||||
"contentSeason", "contentEpisodeNumber", "contentThumbnail", "show", "contentQuality", "quality"]:
|
||||
# ... marcamos hasContentDetails como "true"...
|
||||
self.__dict__["hasContentDetails"] = True
|
||||
# ...y actualizamos infoLables
|
||||
if name == "contentTitle":
|
||||
self.__dict__["infoLabels"]["title"] = value
|
||||
@@ -236,10 +234,6 @@ class Item(object):
|
||||
self.__dict__["viewcontent"] = viewcontent
|
||||
return viewcontent
|
||||
|
||||
# Valor por defecto para hasContentDetails
|
||||
elif name == "hasContentDetails":
|
||||
return False
|
||||
|
||||
# valores guardados en infoLabels
|
||||
elif name in ["contentTitle", "contentPlot", "contentSerieName", "show", "contentType", "contentEpisodeTitle",
|
||||
"contentSeason", "contentEpisodeNumber", "contentThumbnail", "plot", "duration",
|
||||
|
||||
Reference in New Issue
Block a user