Merge remote-tracking branch 'alfa-addon/master'
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<addon id="plugin.video.alfa" name="Alfa" version="2.0.1" provider-name="Alfa Addon">
|
||||
<addon id="plugin.video.alfa" name="Alfa" version="2.0.2" provider-name="Alfa Addon">
|
||||
<requires>
|
||||
<import addon="xbmc.python" version="2.1.0"/>
|
||||
<import addon="script.module.libtorrent" optional="true"/>
|
||||
@@ -19,16 +19,15 @@
|
||||
</assets>
|
||||
<news>[B]Estos son los cambios para esta versión:[/B]
|
||||
[COLOR green][B]Canales agregados y arreglos[/B][/COLOR]
|
||||
[I]- peliculasrey
|
||||
- pelis24
|
||||
- peliscity
|
||||
- peliscon
|
||||
- pelisgratis
|
||||
- pelispad
|
||||
- pelismagnet
|
||||
- rapidvideo
|
||||
- streammango
|
||||
- fix internos[/I]
|
||||
» anitoonstv » qserie
|
||||
» cartoonlatino » repelis
|
||||
» seriesblanco » seodiv
|
||||
» serieslan » pelisplanet
|
||||
» seriesmeme » pepecine
|
||||
» peliscity » pelisporno
|
||||
» okru » vimpleru
|
||||
¤ fix internos
|
||||
[COLOR green]Gracias a [COLOR yellow]danielr460[/COLOR] por su colaboración en esta versión[/COLOR]
|
||||
</news>
|
||||
<description lang="es">Navega con Kodi por páginas web para ver sus videos de manera fácil.</description>
|
||||
<summary lang="en">Browse web pages using Kodi</summary>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
@@ -10,6 +10,17 @@ from core import servertools
|
||||
from core import tmdb
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
from channels import autoplay
|
||||
|
||||
IDIOMAS = {'latino': 'Latino'}
|
||||
list_language = IDIOMAS.values()
|
||||
list_servers = ['openload',
|
||||
'okru',
|
||||
'netutv',
|
||||
'rapidvideo'
|
||||
]
|
||||
list_quality = ['default']
|
||||
|
||||
|
||||
host = "http://www.anitoonstv.com"
|
||||
|
||||
@@ -17,6 +28,7 @@ host = "http://www.anitoonstv.com"
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
thumb_series = get_thumb("channels_tvshow.png")
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
|
||||
itemlist = list()
|
||||
|
||||
@@ -29,6 +41,7 @@ def mainlist(item):
|
||||
itemlist.append(Item(channel=item.channel, action="lista", title="Pokemon", url=host,
|
||||
thumbnail=thumb_series))
|
||||
itemlist = renumbertools.show_option(item.channel, itemlist)
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -73,10 +86,10 @@ def lista(item):
|
||||
if "&" in show:
|
||||
cad = title.split("xy")
|
||||
show = cad[0]
|
||||
|
||||
context1=[renumbertools.context(item), autoplay.context]
|
||||
itemlist.append(
|
||||
item.clone(title=title, url=url, plot=show, action="episodios", show=show,
|
||||
context=renumbertools.context(item)))
|
||||
context=context1))
|
||||
tmdb.set_infoLabels(itemlist)
|
||||
return itemlist
|
||||
|
||||
@@ -144,6 +157,8 @@ def findvideos(item):
|
||||
itemlist.append(item.clone(url=url, action="play", server=server, contentQuality=quality,
|
||||
thumbnail=scrapedthumbnail, plot=scrapedplot,
|
||||
title="Enlace encontrado en %s: [%s]" % (server.capitalize(), quality)))
|
||||
|
||||
autoplay.start(itemlist, item)
|
||||
return itemlist
|
||||
|
||||
|
||||
|
||||
@@ -277,11 +277,11 @@ def start(itemlist, item):
|
||||
platformtools.dialog_notification("AutoPlay", "Nueva Calidad/Servidor disponible en la "
|
||||
"configuracion", sound=False)
|
||||
|
||||
# Restaura si es necesario el valor previo de "Accion y Player Mode" en preferencias
|
||||
if user_config_setting_action != 2:
|
||||
config.set_setting("default_action", user_config_setting_action)
|
||||
if user_config_setting_player != 0:
|
||||
config.set_setting("player_mode", user_config_setting_player)
|
||||
# Restaura si es necesario el valor previo de "Accion y Player Mode" en preferencias
|
||||
if user_config_setting_action != 2:
|
||||
config.set_setting("default_action", user_config_setting_action)
|
||||
if user_config_setting_player != 0:
|
||||
config.set_setting("player_mode", user_config_setting_player)
|
||||
|
||||
# devuelve la lista de enlaces para la eleccion manual
|
||||
return itemlist
|
||||
|
||||
@@ -12,18 +12,29 @@ from core.item import Item
|
||||
from platformcode import config, logger
|
||||
|
||||
host = "http://www.cartoon-latino.com/"
|
||||
from channels import autoplay
|
||||
|
||||
IDIOMAS = {'latino': 'Latino'}
|
||||
list_language = IDIOMAS.values()
|
||||
list_servers = ['openload',
|
||||
'vimple',
|
||||
'gvideo',
|
||||
'rapidvideo'
|
||||
]
|
||||
list_quality = ['default']
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
|
||||
thumb_series = get_thumb("channels_tvshow.png")
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
|
||||
itemlist = list()
|
||||
|
||||
itemlist.append(Item(channel=item.channel, action="lista", title="Series", url=host,
|
||||
thumbnail=thumb_series))
|
||||
itemlist = renumbertools.show_option(item.channel, itemlist)
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
|
||||
return itemlist
|
||||
|
||||
@@ -87,9 +98,10 @@ def lista(item):
|
||||
for link, name in matches:
|
||||
title = name + " [Latino]"
|
||||
url = link
|
||||
context1=[renumbertools.context(item), autoplay.context]
|
||||
itemlist.append(
|
||||
item.clone(title=title, url=url, plot=title, action="episodios", show=title,
|
||||
context=renumbertools.context(item)))
|
||||
context=context1))
|
||||
tmdb.set_infoLabels(itemlist)
|
||||
return itemlist
|
||||
|
||||
@@ -171,11 +183,13 @@ def findvideos(item):
|
||||
if server in link:
|
||||
url = link.replace('" + ID' + server + ' + "', str(id))
|
||||
if "drive" in server:
|
||||
server1 = 'googlevideo'
|
||||
server1 = 'Gvideo'
|
||||
else:
|
||||
server1 = server
|
||||
itemlist.append(item.clone(url=url, action="play", server=server1,
|
||||
title="Enlace encontrado en %s " % (server1.capitalize())))
|
||||
|
||||
autoplay.start(itemlist, item)
|
||||
return itemlist
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
import urlparse
|
||||
@@ -136,33 +136,26 @@ def findvideos(item):
|
||||
|
||||
# Descarga la pagina
|
||||
data = scrapertools.cache_page(item.url)
|
||||
patron = 'class="optxt"><span>(.*?)<.*?width.*?class="q">(.*?)</span.*?cursor: hand" rel="(.*?)"'
|
||||
patron = 'cursor: hand" rel="(.*?)".*?class="optxt"><span>(.*?)<.*?width.*?class="q">(.*?)</span'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedidioma, scrapedcalidad, scrapedurl in matches:
|
||||
for scrapedurl, scrapedidioma, scrapedcalidad in matches:
|
||||
idioma = ""
|
||||
title = item.title + " [" + scrapedcalidad + "][" + scrapedidioma +"]"
|
||||
title = "%s [" + scrapedcalidad + "][" + scrapedidioma +"]"
|
||||
if "youtube" in scrapedurl:
|
||||
scrapedurl += "&"
|
||||
quality = scrapedcalidad
|
||||
language = scrapedidioma
|
||||
if not ("omina.farlante1" in scrapedurl or "404" in scrapedurl):
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, action="play", title=title, fulltitle=title, url=scrapedurl,
|
||||
thumbnail="", plot=plot, show=item.show, quality= quality, language=language))
|
||||
|
||||
itemlist=servertools.get_servers_itemlist(itemlist)
|
||||
Item(channel=item.channel, action="play", title=title, fulltitle=item.title, url=scrapedurl,
|
||||
thumbnail=item.thumbnail, plot=plot, show=item.show, quality= quality, language=language, extra = item.thumbnail))
|
||||
|
||||
itemlist=servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server.capitalize())
|
||||
return itemlist
|
||||
|
||||
|
||||
def play(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = servertools.find_video_items(data=item.url)
|
||||
|
||||
for videoitem in itemlist:
|
||||
videoitem.title = item.title
|
||||
videoitem.fulltitle = item.fulltitle
|
||||
videoitem.thumbnail = item.thumbnail
|
||||
videoitem.channel = item.channel
|
||||
|
||||
return itemlist
|
||||
item.thumbnail = item.extra
|
||||
return [item]
|
||||
|
||||
@@ -97,8 +97,8 @@ def sub_search(item):
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||
# logger.info(data)
|
||||
patron = '<div class="img">.*?<a href="(?P<url>[^"]+)" title="(?P<name>[^"]+)".*?'
|
||||
patron += '<img.+?src="(?P<img>[^"]+)".*?\(([^\)]+)\)"> </a></div>.*?'
|
||||
patron = '<div class="img">.*?<a href="([^"]+)" title="([^"]+)".*?'
|
||||
patron += '<img.+?src="([^"]+)".*?\(([^\)]+)\)"> </a></div>.*?'
|
||||
patron += 'Ver\s(.*?)\sOnline'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
@@ -165,11 +165,11 @@ def peliculas(item):
|
||||
data = re.sub(r"\n|\r|\t|\(.*?\)|\s{2}| ", "", data)
|
||||
patron_todas = '<div class="home-movies">(.*?)<footer>'
|
||||
data = scrapertools.find_single_match(data, patron_todas)
|
||||
patron = 'col-sm-5"><a href="(?P<scrapedurl>[^"]+)".+?'
|
||||
patron += 'browse-movie-link-qd.*?>(?P<calidad>[^>]+)</.+?'
|
||||
patron += '<p>(?P<year>[^>]+)</p>.+?'
|
||||
patron += 'title one-line">(?P<scrapedtitle>[^>]+)</h2>.+?'
|
||||
patron += 'img-responsive" src="(?P<scrapedthumbnail>[^"]+)".*?'
|
||||
patron = 'col-sm-5"><a href="([^"]+)".+?'
|
||||
patron += 'browse-movie-link-qd.*?>([^>]+)</.+?'
|
||||
patron += '<p>([^>]+)</p>.+?'
|
||||
patron += 'title one-line">([^>]+)</h2>.+?'
|
||||
patron += 'img-responsive" src="([^"]+)".*?'
|
||||
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
@@ -185,13 +185,16 @@ def peliculas(item):
|
||||
director = scrapertools.find_single_match(datas, '<div class="list-cast-info tableCell"><a href="[^"]+" rel="tag">([^<]+)</a></div>')
|
||||
title = "%s [COLOR yellow][%s][/COLOR]" % (scrapedtitle.strip(), calidad.upper())
|
||||
|
||||
itemlist.append(Item(channel=item.channel, action="findvideos", title=title, plot='',
|
||||
new_item = Item(channel=item.channel, action="findvideos", title=title, plot='', contentType='movie',
|
||||
url=scrapedurl, contentQuality=calidad, thumbnail=scrapedthumbnail,
|
||||
contentTitle=contentTitle, infoLabels={"year": year, 'rating': rating, 'director': director},
|
||||
text_color=color3))
|
||||
text_color=color3)
|
||||
|
||||
tmdb.set_infoLabels(itemlist, __modo_grafico__)
|
||||
tmdb.set_infoLabels(itemlist, __modo_grafico__)
|
||||
# tmdb.set_infoLabels(itemlist, __modo_grafico__)
|
||||
# tmdb.set_infoLabels(itemlist, __modo_grafico__)
|
||||
if year:
|
||||
tmdb.set_infoLabels_item(new_item, __modo_grafico__)
|
||||
itemlist.append(new_item)
|
||||
|
||||
paginacion = scrapertools.find_single_match(data, '<a class="nextpostslink" rel="next" href="([^"]+)">')
|
||||
if paginacion:
|
||||
@@ -237,70 +240,77 @@ def findvideos(item):
|
||||
|
||||
datas = httptools.downloadpage(item.url).data
|
||||
datas = re.sub(r"\n|\r|\t|\(.*?\)|\s{2}| ", "", datas)
|
||||
# logger.info(data)
|
||||
patron = '<a style="cursor:pointer; cursor: hand;" rel="([^"]+)".*?'
|
||||
patron += 'clearfix colores title_calidad">.*?<span>([^<]+)</span></a>'
|
||||
# logger.info(datas)
|
||||
patron = '<a id="[^"]+" style="cursor:pointer; cursor: hand" rel="([^"]+)".*?'
|
||||
patron += '<span class="optxt"><span>([^<]+)</span>.*?'
|
||||
patron += '<span class="q">([^<]+)</span>'
|
||||
|
||||
matches = re.compile(patron, re.DOTALL).findall(datas)
|
||||
|
||||
for scrapedurl, servidores, in matches:
|
||||
if 'youtube' in scrapedurl:
|
||||
video_urls = []
|
||||
for scrapedurl, lang, servidores in matches:
|
||||
# doc_url = ''
|
||||
doc_id = ''
|
||||
video_urls = []
|
||||
if 'drive' in scrapedurl:
|
||||
doc_id = httptools.downloadpage(scrapedurl).data
|
||||
doc_id = scrapertools.find_single_match(doc_id, "docid=(\w+)")
|
||||
elif 'youtube' in scrapedurl:
|
||||
doc_id = scrapertools.find_single_match(scrapedurl, "docid=(\w+)")
|
||||
doc_url = "http://docs.google.com/get_video_info?docid=%s" % doc_id
|
||||
response = httptools.downloadpage(doc_url, cookies=False)
|
||||
cookies = ""
|
||||
cookie = response.headers["set-cookie"].split("HttpOnly, ")
|
||||
for c in cookie:
|
||||
cookies += c.split(";", 1)[0] + "; "
|
||||
data = response.data.decode('unicode-escape')
|
||||
data = urllib.unquote_plus(urllib.unquote_plus(data))
|
||||
headers_string = "|Cookie=" + cookies
|
||||
url_streams = scrapertools.find_single_match(data, 'url_encoded_fmt_stream_map=(.*)')
|
||||
streams = scrapertools.find_multiple_matches(url_streams,
|
||||
'itag=(\d+)&url=(.*?)(?:;.*?quality=.*?(?:,|&)|&quality=.*?(?:,|&))')
|
||||
itags = {'18':'360p', '22':'720p', '34':'360p', '35':'480p', '37':'1080p', '43':'360p', '59':'480p'}
|
||||
for itag, video_url in streams:
|
||||
video_url += headers_string
|
||||
video_urls.append([video_url, itags[itag]])
|
||||
doc_url = "http://docs.google.com/get_video_info?docid=%s" % doc_id
|
||||
response = httptools.downloadpage(doc_url, cookies=False)
|
||||
cookies = ""
|
||||
cookie = response.headers["set-cookie"].split("HttpOnly, ")
|
||||
for c in cookie:
|
||||
cookies += c.split(";", 1)[0] + "; "
|
||||
data = response.data.decode('unicode-escape')
|
||||
data = urllib.unquote_plus(urllib.unquote_plus(data))
|
||||
headers_string = "|Cookie=" + cookies
|
||||
url_streams = scrapertools.find_single_match(data, 'url_encoded_fmt_stream_map=(.*)')
|
||||
streams = scrapertools.find_multiple_matches(url_streams,
|
||||
'itag=(\d+)&url=(.*?)(?:;.*?quality=.*?(?:,|&)|&quality=.*?(?:,|&))')
|
||||
itags = {'18':'360p', '22':'720p', '34':'360p', '35':'480p', '37':'1080p', '43':'360p', '59':'480p'}
|
||||
for itag, video_url in streams:
|
||||
video_url += headers_string
|
||||
video_urls.append([video_url, itags[itag]])
|
||||
|
||||
for video_item in video_urls:
|
||||
calidad = video_item[1]
|
||||
title = '%s [COLOR green](%s)[/COLOR] [COLOR green]([/COLOR][COLOR black]You[/COLOR][COLOR red]tube[/COLOR][COLOR green])[/COLOR]'%(item.contentTitle, calidad)
|
||||
url = video_item[0]
|
||||
for video_item in video_urls:
|
||||
calidad = video_item[1]
|
||||
title = '%s [COLOR green](%s)[/COLOR] [COLOR green]([/COLOR][COLOR black]You[/COLOR][COLOR red]tube[/COLOR][COLOR green])[/COLOR]'%(item.contentTitle, calidad)
|
||||
url = video_item[0]
|
||||
|
||||
itemlist.append(
|
||||
item.clone(channel=item.channel,
|
||||
action='play',
|
||||
title=title,
|
||||
url= url,
|
||||
thumbnail=item.thumbnail,
|
||||
plot=item.plot,
|
||||
fanart=item.fanart,
|
||||
contentTitle=item.contentTitle,
|
||||
server='directo',
|
||||
context = item.context
|
||||
))
|
||||
itemlist.sort(key=lambda it: it.title, reverse=True)
|
||||
if 'pelispp.com' or 'ultrapelis' in scrapedurl:
|
||||
itemlist.append(
|
||||
item.clone(channel=item.channel,
|
||||
action='play',
|
||||
title=title,
|
||||
url= url,
|
||||
thumbnail=item.thumbnail,
|
||||
quality = calidad,
|
||||
plot=item.plot,
|
||||
fanart=item.fanart,
|
||||
contentTitle=item.contentTitle,
|
||||
language=lang.replace('Español ', ''),
|
||||
server='directo',
|
||||
context = item.context
|
||||
))
|
||||
itemlist.sort(key=lambda it: it.title, reverse=True)
|
||||
if 'pelispp.com' in scrapedurl or 'ultrapelis' in scrapedurl:
|
||||
data = httptools.downloadpage(scrapedurl, headers=headers).data
|
||||
patronr = 'file: "([^"]+)",label:"([^"]+)",type'
|
||||
matchesr = re.compile(patronr, re.DOTALL).findall(data)
|
||||
for scrapedurl, label in matchesr:
|
||||
url = scrapedurl.replace('\\', '')
|
||||
language = 'latino'
|
||||
quality = label.decode('cp1252').encode('utf8')
|
||||
title = item.contentTitle + ' (' + str(label) + ') ([COLOR blue]G[/COLOR][COLOR red]o[/COLOR][COLOR yellow]o[/COLOR][COLOR blue]g[/COLOR][COLOR green]l[/COLOR][COLOR red]e[/COLOR])'
|
||||
thumbnail = item.thumbnail
|
||||
fanart = item.fanart
|
||||
itemlist.append(item.clone(action="play", title=title, url=url, server='directo',
|
||||
thumbnail=thumbnail, fanart=fanart, extra='directo',
|
||||
quality=quality, language=language,))
|
||||
quality=quality, language=lang.replace('Español ', '')))
|
||||
itemlist.sort(key=lambda it: it.title, reverse=True)
|
||||
|
||||
# if 'youtube' not in scrapedurl:
|
||||
servidores.lower()
|
||||
if 'youtube' not in scrapedurl and 'pelispp.com' not in scrapedurl and 'streamplus' not in servidores:
|
||||
if 'drive' not in scrapedurl and 'pelispp.com' not in scrapedurl and 'youtube' not in scrapedurl and 'streamplus' not in servidores:
|
||||
quality = scrapertools.find_single_match(
|
||||
datas, '<p class="hidden-xs hidden-sm">.*?class="magnet-download">([^<]+)p</a>')
|
||||
title = "[COLOR green]%s[/COLOR] [COLOR yellow][%s][/COLOR] [COLOR yellow][%s][/COLOR]" % (
|
||||
@@ -309,14 +319,9 @@ def findvideos(item):
|
||||
thumbnail = item.thumbnail
|
||||
server = servertools.get_server_from_url(url)
|
||||
|
||||
itemlist.append(item.clone(action='play', title=title, url=url, quality=quality,
|
||||
itemlist.append(item.clone(action='play', title=title, url=url, quality=quality, language=lang.replace('Español ', ''),
|
||||
server=server, text_color=color3, thumbnail=thumbnail))
|
||||
|
||||
for videoitem in itemlist:
|
||||
videoitem.infoLabels = item.infoLabels
|
||||
videoitem.channel = item.channel
|
||||
videoitem.action = 'play'
|
||||
videoitem.fulltitle = item.title
|
||||
|
||||
if config.get_videolibrary_support() and len(itemlist) > 0:
|
||||
itemlist.append(Item(channel=item.channel,
|
||||
|
||||
@@ -28,18 +28,14 @@ def lista(item):
|
||||
|
||||
# Descarga la pagina
|
||||
data = httptools.downloadpage(item.url).data
|
||||
|
||||
# Extrae las entradas (carpetas)
|
||||
patron = '<div class="Picture">.*?href="([^"]+)".*?<img src="([^"]+)".*?' \
|
||||
'<span class="fa-clock.*?>([^<]+)<.*?<h2 class="Title">.*?>([^<]+)</a>' \
|
||||
'.*?<p>(.*?)</p>'
|
||||
patron = '<div class="video.".*?<a href="(.*?)" title="(.*?)">.*?<img src="(.*?)".*?\/>.*?duration.*?>(.*?)<'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
for scrapedurl, scrapedthumbnail, duration, scrapedtitle, plot in matches:
|
||||
for scrapedurl, scrapedtitle, scrapedthumbnail, duration in matches:
|
||||
if duration:
|
||||
scrapedtitle += " (%s)" % duration
|
||||
|
||||
itemlist.append(item.clone(action="findvideos", title=scrapedtitle, url=scrapedurl, thumbnail=scrapedthumbnail,
|
||||
infoLabels={'plot': plot}))
|
||||
itemlist.append(item.clone(action="findvideos", title=scrapedtitle, url=scrapedurl, thumbnail=scrapedthumbnail))
|
||||
|
||||
# Extrae la marca de siguiente página
|
||||
next_page = scrapertools.find_single_match(data, '<a class="nextpostslink" rel="next" href="([^"]+)"')
|
||||
@@ -57,12 +53,9 @@ def categorias(item):
|
||||
data = httptools.downloadpage(item.url).data
|
||||
|
||||
# Extrae las entradas (carpetas)
|
||||
patron = '<figure class="Picture">.*?<a href="([^"]+)".*?src="([^"]+)".*?<a.*?>(.*?)</a>' \
|
||||
'.*?<span class="fa-film Clr3B">(\d+)'
|
||||
patron = '<li class="cat-item cat-item-.*?"><a href="(.*?)".*?>(.*?)<'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
for scrapedurl, scrapedthumbnail, scrapedtitle, cantidad in matches:
|
||||
if cantidad:
|
||||
scrapedtitle += " (%s vídeos)" % cantidad
|
||||
itemlist.append(item.clone(action="lista", title=scrapedtitle, url=scrapedurl, thumbnail=scrapedthumbnail))
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
itemlist.append(item.clone(action="lista", title=scrapedtitle, url=scrapedurl))
|
||||
|
||||
return itemlist
|
||||
|
||||
@@ -355,8 +355,6 @@ def findvideos(item):
|
||||
except:
|
||||
return itemlist # Devolvemos lista vacia
|
||||
|
||||
lista_servers = servertools.get_servers_list()
|
||||
|
||||
for link in data_dict["link"]:
|
||||
if item.contentType == 'episode' \
|
||||
and (item.contentSeason != link['season'] or item.contentEpisodeNumber != link['episode']):
|
||||
@@ -367,17 +365,17 @@ def findvideos(item):
|
||||
flag = scrapertools.find_single_match(link["label"], '(\s*\<img src=.*\>)')
|
||||
idioma = link["label"].replace(flag, "")
|
||||
if link["quality"] != "?":
|
||||
calidad = (' [' + link["quality"] + ']')
|
||||
calidad = (link["quality"])
|
||||
else:
|
||||
calidad = ""
|
||||
video = find_videos(link["url"], lista_servers)
|
||||
itemlist.extend(servertools.find_video_items(data=url))
|
||||
|
||||
if video["servidor"] != "":
|
||||
servidor = video["servidor"]
|
||||
url = video["url"]
|
||||
title = "Ver en " + servidor.capitalize() + calidad + ' (' + idioma + ')'
|
||||
itemlist.append(item.clone(action="play", viewmode="list", server=servidor, title=title,
|
||||
text_color="0xFF994D00", url=url, folder=False))
|
||||
for videoitem in itemlist:
|
||||
videoitem.channel = item.channel
|
||||
videoitem.quality = calidad
|
||||
videoitem.language = idioma
|
||||
videoitem.contentTitle = item.title
|
||||
itemlist = servertools.get_servers_itemlist(itemlist)
|
||||
|
||||
if config.get_videolibrary_support() and itemlist and item.contentType == "movie":
|
||||
infoLabels = {'tmdb_id': item.infoLabels['tmdb_id'],
|
||||
@@ -390,40 +388,6 @@ def findvideos(item):
|
||||
return itemlist
|
||||
|
||||
|
||||
def find_videos(url, lista_servers):
|
||||
# logger.info()
|
||||
ret = {'titulo': "",
|
||||
'url': "",
|
||||
'servidor': ""}
|
||||
|
||||
# Ejecuta el find_videos en cada servidor hasta que encuentra una coicidencia
|
||||
for serverid in lista_servers:
|
||||
try:
|
||||
servers_module = __import__("servers." + serverid)
|
||||
server_module = getattr(servers_module, serverid)
|
||||
devuelve = server_module.find_videos(url)
|
||||
|
||||
if devuelve:
|
||||
ret["titulo"] = devuelve[0][0]
|
||||
ret["url"] = devuelve[0][1]
|
||||
ret["servidor"] = devuelve[0][2]
|
||||
# reordenar el listado, es probable q el proximo enlace sea del mismo servidor
|
||||
lista_servers.remove(serverid)
|
||||
lista_servers.insert(0, serverid)
|
||||
break
|
||||
|
||||
except ImportError:
|
||||
logger.error("No existe conector para #" + serverid + "#")
|
||||
# import traceback
|
||||
# logger.info(traceback.format_exc())
|
||||
except:
|
||||
logger.error("Error en el conector #" + serverid + "#")
|
||||
import traceback
|
||||
logger.error(traceback.format_exc())
|
||||
|
||||
return ret
|
||||
|
||||
|
||||
def episodios(item):
|
||||
# Necesario para las actualizaciones automaticas
|
||||
return get_temporadas(Item(channel=__chanel__, url=item.url, show=item.show, extra="serie_add"))
|
||||
|
||||
@@ -60,18 +60,15 @@ def todas(item):
|
||||
idioma = scrapertools.decodeHtmlentities(idioma)
|
||||
url = urlparse.urljoin(item.url, scrapedurl)
|
||||
year = scrapedyear
|
||||
if idioma in audio:
|
||||
idioma = audio[idioma]
|
||||
else:
|
||||
idioma = audio['Sub Español']
|
||||
|
||||
title = scrapertools.decodeHtmlentities(scrapedtitle) + ' (' + idioma + ')'
|
||||
title = scrapertools.decodeHtmlentities(scrapedtitle)
|
||||
thumbnail = scrapedthumbnail
|
||||
plot = scrapedplot
|
||||
fanart = 'https://s31.postimg.org/dousrbu9n/qserie.png'
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, action="temporadas", title=title, url=url, thumbnail=thumbnail, plot=plot,
|
||||
fanart=fanart, extra=idioma, contentSerieName=scrapedtitle, infoLabels={'year': year}))
|
||||
fanart=fanart, extra=idioma, contentSerieName=scrapedtitle, infoLabels={'year': year},
|
||||
language=idioma))
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
# Paginacion
|
||||
siguiente = ''
|
||||
|
||||
281
plugin.video.alfa/channels/repelis.py
Executable file → Normal file
281
plugin.video.alfa/channels/repelis.py
Executable file → Normal file
@@ -5,6 +5,8 @@ import urlparse
|
||||
|
||||
from core import scrapertools
|
||||
from core import servertools
|
||||
from core import httptools
|
||||
from core import tmdb
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
|
||||
@@ -19,130 +21,107 @@ def mainlist(item):
|
||||
mifan = "http://www.psicocine.com/wp-content/uploads/2013/08/Bad_Robot_Logo.jpg"
|
||||
|
||||
itemlist.append(Item(channel=item.channel, action="menupelis", title="Peliculas", url="http://www.repelis.tv/pag/1",
|
||||
thumbnail="http://www.gaceta.es/sites/default/files/styles/668x300/public/metro_goldwyn_mayer_1926-web.png?itok=-lRSR9ZC",
|
||||
thumbnail="http://www.gaceta.es/sites/default/files/styles/668x300/public"
|
||||
"/metro_goldwyn_mayer_1926-web.png?itok=-lRSR9ZC",
|
||||
fanart=mifan))
|
||||
itemlist.append(Item(channel=item.channel, action="menuestre", title="Estrenos",
|
||||
url="http://www.repelis.tv/archivos/estrenos/pag/1",
|
||||
thumbnail="http://t0.gstatic.com/images?q=tbn:ANd9GcS4g68rmeLQFuX7iCrPwd00FI_OlINZXCYXEFrJHTZ0VSHefIIbaw",
|
||||
thumbnail="http://t0.gstatic.com/images?q=tbn"
|
||||
":ANd9GcS4g68rmeLQFuX7iCrPwd00FI_OlINZXCYXEFrJHTZ0VSHefIIbaw",
|
||||
fanart=mifan))
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, action="menudesta", title="Destacadas", url="http://www.repelis.tv/pag/1",
|
||||
thumbnail="http://img.irtve.es/v/1074982/", fanart=mifan))
|
||||
itemlist.append(Item(channel=item.channel, action="todaspelis", title="Proximos estrenos",
|
||||
Item(channel=item.channel, action="menudesta", title="Destacadas", url="http://www.repelis.tv/pag/1",
|
||||
thumbnail="http://img.irtve.es/v/1074982/", fanart=mifan))
|
||||
itemlist.append(Item(channel=item.channel, action="menupelis", title="Proximos estrenos",
|
||||
url="http://www.repelis.tv/archivos/proximos-estrenos/pag/1",
|
||||
thumbnail="https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcTpsRC-GTYzCqhor2gIDfAB61XeymwgXWSVBHoRAKs2c5HAn29f&reload=on",
|
||||
thumbnail="https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcTpsRC"
|
||||
"-GTYzCqhor2gIDfAB61XeymwgXWSVBHoRAKs2c5HAn29f&reload=on",
|
||||
fanart=mifan))
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, action="todaspelis", title="Todas las Peliculas", url="http://www.repelis.tv/pag/1",
|
||||
thumbnail="https://freaksociety.files.wordpress.com/2012/02/logos-cine.jpg", fanart=mifan))
|
||||
itemlist.append(Item(channel=item.channel, action="menupelis", title="Todas las Peliculas",
|
||||
url="http://www.repelis.tv/pag/1",
|
||||
thumbnail="https://freaksociety.files.wordpress.com/2012/02/logos-cine.jpg", fanart=mifan))
|
||||
|
||||
if config.get_setting("adult_mode") != 0:
|
||||
itemlist.append(Item(channel=item.channel, action="todaspelis", title="Eroticas +18",
|
||||
itemlist.append(Item(channel=item.channel, action="menupelis", title="Eroticas +18",
|
||||
url="http://www.repelis.tv/genero/eroticas/pag/1",
|
||||
thumbnail="http://www.topkamisetas.com/catalogo/images/TB0005.gif",
|
||||
fanart="http://www.topkamisetas.com/catalogo/images/TB0005.gif"))
|
||||
# Quito la busqueda por año si no esta enabled el adultmode, porque no hay manera de filtrar los enlaces eroticos72
|
||||
fanart="http://www.topkamisetas.com/catalogo/images/TB0005.gif", extra='adult'))
|
||||
# Quito la busqueda por año si no esta enabled el adultmode, porque no hay manera de filtrar los enlaces
|
||||
# eroticos72
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, action="poranyo", title="Por Año", url="http://www.repelis.tv/anio/2016",
|
||||
thumbnail="http://t3.gstatic.com/images?q=tbn:ANd9GcSkxiYXdBcI0cvBLsb_nNlz_dWXHRl2Q-ER9dPnP1gNUudhrqlR",
|
||||
fanart=mifan))
|
||||
Item(channel=item.channel, action="poranyo", title="Por Año", url="http://www.repelis.tv/anio/2016",
|
||||
thumbnail="http://t3.gstatic.com/images?q=tbn:ANd9GcSkxiYXdBcI0cvBLsb_nNlz_dWXHRl2Q"
|
||||
"-ER9dPnP1gNUudhrqlR",
|
||||
fanart=mifan))
|
||||
|
||||
# Por categoria si que filtra la categoria de eroticos
|
||||
itemlist.append(Item(channel=item.channel, action="porcateg", title="Por Categoria",
|
||||
url="http://www.repelis.tv/genero/accion/pag/1",
|
||||
thumbnail="http://www.logopro.it/blog/wp-content/uploads/2013/07/categoria-sigaretta-elettronica.png",
|
||||
thumbnail="http://www.logopro.it/blog/wp-content/uploads/2013/07/categoria-sigaretta"
|
||||
"-elettronica.png",
|
||||
fanart=mifan))
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, action="search", title="Buscar...", url="http://www.repelis.tv/search/?s=",
|
||||
thumbnail="http://thumbs.dreamstime.com/x/buscar-pistas-13159747.jpg", fanart=mifan))
|
||||
Item(channel=item.channel, action="search", title="Buscar...", url="http://www.repelis.tv/search/?s=",
|
||||
thumbnail="http://thumbs.dreamstime.com/x/buscar-pistas-13159747.jpg", fanart=mifan))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
# Peliculas recien agregadas ( quitamos las de estreno del slide-bar en el top
|
||||
|
||||
def menupelis(item):
|
||||
logger.info(item.url)
|
||||
|
||||
itemlist = []
|
||||
|
||||
data = scrapertools.cache_page(item.url).decode('iso-8859-1').encode('utf-8')
|
||||
data = httptools.downloadpage(item.url).data.decode('iso-8859-1').encode('utf-8')
|
||||
|
||||
if item.extra == '':
|
||||
section = 'Recién Agregadas'
|
||||
elif item.extra == 'year':
|
||||
section = 'del Año \d{4}'
|
||||
elif item.extra == 'adult':
|
||||
section = 'de Eróticas \+18'
|
||||
else:
|
||||
section = 'de %s'%item.extra
|
||||
|
||||
patronenlaces = '<h.>Películas %s<\/h.>.*?>(.*?)<\/section>'%section
|
||||
|
||||
|
||||
patronenlaces = '<h3>Películas Recién Agregadas</h3>.*?>(.*?)</section>'
|
||||
matchesenlaces = re.compile(patronenlaces, re.DOTALL).findall(data)
|
||||
|
||||
logger.info("begin ----------")
|
||||
scrapertools.printMatches(matchesenlaces)
|
||||
logger.info("end ----------")
|
||||
|
||||
for bloque_enlaces in matchesenlaces:
|
||||
|
||||
patron = '<div class="poster-media-card">.*?'
|
||||
patron += '<a href="(.*?)".*?title="(.*?)".*?'
|
||||
patron += '<a href="(.*?)".*?title="(.*?)"(.*?)'
|
||||
patron += '<img src="(.*?)"'
|
||||
matches = re.compile(patron, re.DOTALL).findall(bloque_enlaces)
|
||||
scrapertools.printMatches(matches)
|
||||
|
||||
for scrapedurl, scrapedtitle, scrapedthumbnail in matches:
|
||||
for scrapedurl, scrapedtitle, extra_info, scrapedthumbnail in matches:
|
||||
logger.info("He encontrado el segundo bloque")
|
||||
logger.info("extra_info: %s" % extra_info)
|
||||
title = scrapertools.remove_show_from_title(scrapedtitle, "Ver Película")
|
||||
title = title.replace("Online", "");
|
||||
url = urlparse.urljoin(item.url, scrapedurl)
|
||||
thumbnail = urlparse.urljoin(item.url, scrapedthumbnail)
|
||||
itemlist.append(Item(channel=item.channel, action="findvideos", title=title, fulltitle=title, url=url,
|
||||
thumbnail=thumbnail, fanart=thumbnail))
|
||||
quality = scrapertools.find_single_match(extra_info, 'calidad.*?>Calidad (.*?)<')
|
||||
year = scrapertools.find_single_match(extra_info, '"anio">(\d{4})<')
|
||||
language = scrapertools.find_multiple_matches(extra_info, 'class="(latino|espanol|subtitulado)"')
|
||||
# if language = 'ingles':
|
||||
# language='vo'
|
||||
new_item=Item(channel=item.channel, action="findvideos", title=title, fulltitle=title, url=url,
|
||||
thumbnail=thumbnail, fanart=thumbnail, language=language, quality=quality,
|
||||
infoLabels={'year': year})
|
||||
if year:
|
||||
tmdb.set_infoLabels_item(new_item)
|
||||
|
||||
## Paginación
|
||||
# <span class="current">2</span><a href="http://www.repelis.tv/page/3"
|
||||
itemlist.append(new_item)
|
||||
|
||||
# Si falla no muestra ">> Página siguiente"
|
||||
try:
|
||||
next_page = scrapertools.get_match(data, '<span class="current">\d+</span><a href="([^"]+)"')
|
||||
title = "[COLOR red][B]Pagina siguiente »[/B][/COLOR]"
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, title=title, url=next_page, action="menupelis", thumbnail=item.thumbnail,
|
||||
fanart=item.fanart, folder=True))
|
||||
except:
|
||||
pass
|
||||
return itemlist
|
||||
|
||||
|
||||
# Todas las peliculas
|
||||
def todaspelis(item):
|
||||
logger.info(item.url)
|
||||
|
||||
itemlist = []
|
||||
|
||||
data = scrapertools.cache_page(item.url).decode('iso-8859-1').encode('utf-8')
|
||||
print data
|
||||
patronenlaces = '<h1>.*?</h1>.*?>(.*?)</section>'
|
||||
matchesenlaces = re.compile(patronenlaces, re.DOTALL).findall(data)
|
||||
|
||||
for bloque_enlaces in matchesenlaces:
|
||||
|
||||
# patron = '<a href="([^"]+)" title="([^"]+)"> <div class="poster".*?<img src="([^"]+)"'
|
||||
|
||||
patron = '<div class="poster-media-card">.*?'
|
||||
patron += '<a href="(.*?)".*?title="(.*?)".*?'
|
||||
patron += '<img src="(.*?)"'
|
||||
|
||||
matches = re.compile(patron, re.DOTALL).findall(bloque_enlaces)
|
||||
scrapertools.printMatches(matches)
|
||||
for scrapedurl, scrapedtitle, scrapedthumbnail in matches:
|
||||
title = scrapertools.remove_show_from_title(scrapedtitle, "Ver Película")
|
||||
title = title.replace("Online", "");
|
||||
url = urlparse.urljoin(item.url, scrapedurl)
|
||||
thumbnail = urlparse.urljoin(item.url, scrapedthumbnail)
|
||||
itemlist.append(Item(channel=item.channel, action="findvideos", title=title, fulltitle=title, url=url,
|
||||
thumbnail=thumbnail, fanart=thumbnail))
|
||||
|
||||
## Paginación
|
||||
# <span class="current">2</span><a href="http://www.repelis.tv/page/3"
|
||||
|
||||
# Si falla no muestra ">> Página siguiente"
|
||||
try:
|
||||
next_page = scrapertools.get_match(data, '<span class="current">\d+</span><a href="([^"]+)"')
|
||||
title = "[COLOR red][B]Pagina siguiente »[/B][/COLOR]"
|
||||
itemlist.append(Item(channel=item.channel, title=title, url=next_page, action="todaspelis", folder=True))
|
||||
Item(channel=item.channel, title=title, url=next_page, action="menupelis", thumbnail=item.thumbnail,
|
||||
fanart=item.fanart, folder=True, extra=item.extra))
|
||||
except:
|
||||
pass
|
||||
return itemlist
|
||||
@@ -154,7 +133,7 @@ def menudesta(item):
|
||||
|
||||
itemlist = []
|
||||
|
||||
data = scrapertools.cache_page(item.url).decode('iso-8859-1').encode('utf-8')
|
||||
data = httptools.downloadpage(item.url).data.decode('iso-8859-1').encode('utf-8')
|
||||
|
||||
patronenlaces = '<h3>.*?Destacadas.*?>(.*?)<h3>'
|
||||
matchesenlaces = re.compile(patronenlaces, re.DOTALL).findall(data)
|
||||
@@ -168,7 +147,6 @@ def menudesta(item):
|
||||
patron += '<img src="(.*?)"'
|
||||
|
||||
matches = re.compile(patron, re.DOTALL).findall(bloque_enlaces)
|
||||
scrapertools.printMatches(matches)
|
||||
for scrapedurl, scrapedtitle, scrapedthumbnail in matches:
|
||||
title = scrapertools.remove_show_from_title(scrapedtitle, "Ver Película")
|
||||
title = title.replace("Online", "");
|
||||
@@ -186,7 +164,7 @@ def menuestre(item):
|
||||
|
||||
itemlist = []
|
||||
|
||||
data = scrapertools.cache_page(item.url).decode('iso-8859-1').encode('utf-8')
|
||||
data = httptools.downloadpage(item.url).data.decode('iso-8859-1').encode('utf-8')
|
||||
patronenlaces = '<h1>Estrenos</h1>(.*?)</section>'
|
||||
matchesenlaces = re.compile(patronenlaces, re.DOTALL).findall(data)
|
||||
|
||||
@@ -195,18 +173,22 @@ def menuestre(item):
|
||||
# patron = '<a href="([^"]+)" title="([^"]+)"> <div class="poster".*?<img src="([^"]+)"'
|
||||
|
||||
patron = '<div class="poster-media-card">.*?'
|
||||
patron += '<a href="(.*?)".*?title="(.*?)".*?'
|
||||
patron += '<a href="(.*?)".*?title="(.*?)"(.*?)'
|
||||
patron += '<img src="(.*?)"'
|
||||
|
||||
matches = re.compile(patron, re.DOTALL).findall(bloque_enlaces)
|
||||
scrapertools.printMatches(matches)
|
||||
for scrapedurl, scrapedtitle, scrapedthumbnail in matches:
|
||||
for scrapedurl, scrapedtitle, extra_info, scrapedthumbnail in matches:
|
||||
title = scrapertools.remove_show_from_title(scrapedtitle, "Ver Película")
|
||||
title = title.replace("Online", "");
|
||||
url = urlparse.urljoin(item.url, scrapedurl)
|
||||
thumbnail = urlparse.urljoin(item.url, scrapedthumbnail)
|
||||
quality = scrapertools.find_single_match(extra_info, 'calidad.*?>Calidad (.*?)<')
|
||||
year = scrapertools.find_single_match(extra_info, '"anio">(\d{4})<')
|
||||
language = scrapertools.find_single_match(extra_info, 'class="(latino|espanol|subtitulado)"')
|
||||
|
||||
itemlist.append(Item(channel=item.channel, action="findvideos", title=title, fulltitle=title, url=url,
|
||||
thumbnail=thumbnail, fanart=thumbnail))
|
||||
thumbnail=thumbnail, fanart=thumbnail, language=language, quality=quality,
|
||||
infoLabels={'year': year}))
|
||||
|
||||
## Paginación
|
||||
# <span class="current">2</span><a href="http://www.repelis.tv/page/3"
|
||||
@@ -226,34 +208,15 @@ def findvideos(item):
|
||||
|
||||
itemlist = []
|
||||
|
||||
data = scrapertools.cache_page(item.url).decode('iso-8859-1').encode('utf-8')
|
||||
data = httptools.downloadpage(item.url).data.decode('iso-8859-1').encode('utf-8')
|
||||
|
||||
'''<h2>Sinopsis</2><p>(.*?)</p>
|
||||
<div id="informacion" class="tab-pane">
|
||||
<h2>Titulo en Español</h2>
|
||||
<p>Abzurdah</p>
|
||||
<h2>Titulo Original</h2>
|
||||
<p>Abzurdah</p>
|
||||
<h2>Año de Lanzamiento</h2>
|
||||
<p>2015</p>
|
||||
<h2>Generos</h2>
|
||||
<p>Romance</p>
|
||||
<h2>Idioma</h2>
|
||||
<p>Latino</p>
|
||||
<h2>Calidad</h2>
|
||||
<p>DVD-Rip</p>
|
||||
'''
|
||||
|
||||
# estos son los datos para plot
|
||||
patron = '<h2>Sinopsis</h2>.*?<p>(.*?)</p>.*?<div id="informacion".*?</h2>.*?<p>(.*?)</p>' # titulo
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
scrapertools.printMatches(matches)
|
||||
for sinopsis, title in matches:
|
||||
title = "[COLOR white][B]" + title + "[/B][/COLOR]"
|
||||
|
||||
patron = '<div id="informacion".*?>(.*?)</div>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
scrapertools.printMatches(matches)
|
||||
for scrapedplot in matches:
|
||||
splot = title + "\n\n"
|
||||
plot = scrapedplot
|
||||
@@ -273,37 +236,45 @@ def findvideos(item):
|
||||
|
||||
patron = '<tbody>(.*?)</tbody>'
|
||||
matchesx = re.compile(patron, re.DOTALL).findall(data)
|
||||
scrapertools.printMatches(matchesx)
|
||||
|
||||
for bloq in matchesx:
|
||||
patron = 'href="(.*?)".*?0 0">(.*?)</.*?<td>(.*?)</.*?<td>(.*?)<'
|
||||
|
||||
matches = re.compile(patron, re.DOTALL).findall(bloq)
|
||||
# scrapertools.printMatches(matches)
|
||||
|
||||
for scrapedurl, scrapedserver, scrapedlang, scrapedquality in matches:
|
||||
url = urlparse.urljoin(item.url, scrapedurl)
|
||||
logger.info("Lang:[" + scrapedlang + "] Quality[" + scrapedquality + "] URL[" + url + "]")
|
||||
patronenlaces = '.*?://(.*?)/'
|
||||
matchesenlaces = re.compile(patronenlaces, re.DOTALL).findall(scrapedurl)
|
||||
scrapertools.printMatches(matchesenlaces)
|
||||
scrapedtitle = ""
|
||||
if scrapedserver == 'Vimple':
|
||||
scrapedserver = 'vimpleru'
|
||||
elif scrapedserver == 'Ok.ru':
|
||||
scrapedserver = 'okru'
|
||||
server = servertools.get_server_name(scrapedserver)
|
||||
for scrapedenlace in matchesenlaces:
|
||||
scrapedtitle = title + " [COLOR white][ [/COLOR]" + "[COLOR green]" + scrapedquality + "[/COLOR]" + "[COLOR white] ][/COLOR]" + " [COLOR red] [" + scrapedlang + "][/COLOR] » " + scrapedserver
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, action="play", title=scrapedtitle, extra=title, url=url, fanart=item.thumbnail,
|
||||
thumbnail=item.thumbnail, plot=splot, folder=False))
|
||||
|
||||
itemlist.append(Item(channel=item.channel, action="play", title=scrapedtitle, extra=title, url=url,
|
||||
fanart=item.thumbnail, thumbnail=item.thumbnail, plot=splot, language=scrapedlang,
|
||||
quality=scrapedquality, server=server))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def play(item):
|
||||
logger.info("url=" + item.url)
|
||||
logger.info()
|
||||
itemlist =[]
|
||||
|
||||
# itemlist = servertools.find_video_items(data=item.url)
|
||||
data = httptools.downloadpage(item.url).data
|
||||
|
||||
url = scrapertools.find_single_match(scrapertools.cache_page(item.url), '<iframe src="([^"]+)"')
|
||||
itemlist = servertools.find_video_items(data=url)
|
||||
enc = scrapertools.find_multiple_matches(data, "Player\.decode\('(.*?)'\)")
|
||||
dec=''
|
||||
for cod in enc:
|
||||
dec+=decode(cod)
|
||||
url = scrapertools.find_single_match(dec,'src="(.*?)"')
|
||||
itemlist.append(item.clone(url=url))
|
||||
|
||||
return itemlist
|
||||
|
||||
@@ -314,17 +285,10 @@ def search(item, texto):
|
||||
item.url = 'http://www.repelis.tv/buscar/?s=%s' % (texto)
|
||||
logger.info(item.url)
|
||||
|
||||
data = scrapertools.cache_page(item.url).decode('iso-8859-1').encode('utf-8')
|
||||
data = httptools.downloadpage(item.url).data.decode('iso-8859-1').encode('utf-8')
|
||||
|
||||
logger.info("data: " + data)
|
||||
|
||||
'''
|
||||
<div class="col-xs-2">
|
||||
<div class="row">
|
||||
<a href="http://www.repelis.tv/8973/pelicula/contracted-phase-ii.html" title="Ver PelÃÂcula Contracted: Phase II Online">
|
||||
<img src="http://1.bp.blogspot.com/-YWmw6voBipE/VcB91p-EcnI/AAAAAAAAQZs/EhUzWlInmA8/s175/contracted-phase-2.jpg" border="0">
|
||||
'''
|
||||
|
||||
patron = '<div class="col-xs-2">.*?'
|
||||
patron += '<div class="row">.*?'
|
||||
patron += '<a href="(.*?)" title="(.*?)">.*?'
|
||||
@@ -334,8 +298,6 @@ def search(item, texto):
|
||||
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
scrapertools.printMatches(matches)
|
||||
print "repelis ..................................."
|
||||
itemlist = []
|
||||
|
||||
for scrapedurl, scrapedtitle, scrapedthumbnail in matches:
|
||||
@@ -344,43 +306,38 @@ def search(item, texto):
|
||||
url = urlparse.urljoin(item.url, scrapedurl)
|
||||
thumbnail = urlparse.urljoin(item.url, scrapedthumbnail)
|
||||
logger.info(url)
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, action="findvideos", title=title, fulltitle=title, url=url, thumbnail=thumbnail,
|
||||
fanart=thumbnail))
|
||||
itemlist.append(Item(channel=item.channel, action="findvideos", title=title, fulltitle=title, url=url,
|
||||
thumbnail=thumbnail, fanart=thumbnail))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
# Por año, aquà está difÃcil filtrar las "eroticas" asà que quito la opcion si no esta el adultmode enabled
|
||||
def poranyo(item):
|
||||
logger.info(item.url)
|
||||
|
||||
itemlist = []
|
||||
|
||||
data = scrapertools.cache_page(item.url).decode('iso-8859-1').encode('utf-8')
|
||||
data = httptools.downloadpage(item.url).data.decode('iso-8859-1').encode('utf-8')
|
||||
|
||||
patron = '<option value="([^"]+)">(.*?)</option>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
scrapertools.printMatches(matches)
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
title = scrapertools.remove_show_from_title(scrapedtitle, "Ver Película")
|
||||
title = title.replace("Online", "")
|
||||
url = urlparse.urljoin(item.url, scrapedurl)
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, action="todaspelis", title=title, fulltitle=title, url=url, fanart=item.fanart))
|
||||
itemlist.append(Item(channel=item.channel, action="menupelis", title=title, fulltitle=title, url=url,
|
||||
fanart=item.fanart, extra='year'))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
# Aqui si que se filtran las eroticas
|
||||
def porcateg(item):
|
||||
logger.info(item.url)
|
||||
itemlist = []
|
||||
|
||||
data = scrapertools.cache_page(item.url).decode('iso-8859-1').encode('utf-8')
|
||||
data = httptools.downloadpage(item.url).data.decode('iso-8859-1').encode('utf-8')
|
||||
patron = '<li class="cat-item cat-item-3">.*?<a href="([^"]+)" title="([^"]+)">'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
scrapertools.printMatches(matches)
|
||||
itemlist = []
|
||||
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
@@ -389,17 +346,49 @@ def porcateg(item):
|
||||
url = urlparse.urljoin(item.url, scrapedurl)
|
||||
logger.info(url)
|
||||
# si no esta permitidas categoria adultos, la filtramos
|
||||
erotica = ""
|
||||
if config.get_setting("adult_mode") == 0:
|
||||
patron = '.*?/erotic.*?'
|
||||
try:
|
||||
erotica = scrapertools.get_match(scrapedurl, patron)
|
||||
except:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, action="todaspelis", fanart=item.fanart, title=title, fulltitle=title,
|
||||
url=url))
|
||||
extra = title
|
||||
adult_mode = config.get_setting("adult_mode")
|
||||
if adult_mode != 0:
|
||||
if 'erotic' in scrapedurl:
|
||||
extra = 'adult'
|
||||
else:
|
||||
itemlist.append(Item(channel=item.channel, action="todaspelis", title=title, fulltitle=title, url=url,
|
||||
fanart=item.fanart))
|
||||
extra=title
|
||||
|
||||
if (extra=='adult' and adult_mode != 0) or extra != 'adult':
|
||||
itemlist.append(Item(channel=item.channel, action="menupelis", title=title, fulltitle=title, url=url,
|
||||
fanart=item.fanart, extra = extra))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def decode(string):
|
||||
|
||||
keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
|
||||
output = ''
|
||||
input = string.encode('utf8')
|
||||
i = 0
|
||||
while i < len(input):
|
||||
|
||||
enc1 = keyStr.index(input[i])
|
||||
i += 1
|
||||
enc2 = keyStr.index(input[i])
|
||||
i += 1
|
||||
enc3 = keyStr.index(input[i])
|
||||
i += 1
|
||||
enc4 = keyStr.index(input[i])
|
||||
i += 1
|
||||
|
||||
chr1 = (enc1 << 2) | (enc2 >> 4)
|
||||
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2)
|
||||
chr3 = ((enc3 & 3) << 6) | enc4
|
||||
|
||||
output = output + unichr(chr1)
|
||||
if enc3 != 64:
|
||||
output = output + unichr(chr2)
|
||||
|
||||
if enc4 != 64:
|
||||
output = output + unichr(chr3)
|
||||
|
||||
output = output.decode('utf8')
|
||||
|
||||
return output
|
||||
@@ -20,7 +20,7 @@ list_servers = ['openload',
|
||||
list_quality = ['default']
|
||||
|
||||
host = 'http://www.seodiv.com'
|
||||
|
||||
language = 'latino'
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
@@ -35,7 +35,6 @@ def mainlist(item):
|
||||
url=host,
|
||||
thumbnail='https://s27.postimg.org/iahczwgrn/series.png',
|
||||
fanart='https://s27.postimg.org/iahczwgrn/series.png',
|
||||
language='latino'
|
||||
))
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
return itemlist
|
||||
@@ -65,8 +64,7 @@ def todas(item):
|
||||
fanart=fanart,
|
||||
contentSerieName=title,
|
||||
extra='',
|
||||
language=item.language,
|
||||
quality='default',
|
||||
language=language,
|
||||
context=autoplay.context
|
||||
))
|
||||
|
||||
@@ -102,8 +100,6 @@ def temporadas(item):
|
||||
plot=plot, fanart=fanart,
|
||||
temp=str(temp),
|
||||
contentSerieName=item.contentSerieName,
|
||||
language=item.language,
|
||||
quality=item.quality,
|
||||
context=item.context
|
||||
))
|
||||
temp = temp + 1
|
||||
@@ -158,16 +154,14 @@ def episodiosxtemp(item):
|
||||
|
||||
logger.info()
|
||||
itemlist = []
|
||||
item.title = 'Temporada %s' % item.temp.zfill(2)
|
||||
patron_temp = '<li class=item\d+><a href=#>%s <\/a><ul><!--initiate accordion-->.*?<!--initiate ' \
|
||||
'accordion-->' % item.title
|
||||
all_data = get_source(item.url)
|
||||
data = scrapertools.find_single_match(all_data, patron_temp)
|
||||
tempo = item.title
|
||||
if 'Temporada' in item.title:
|
||||
item.title = item.title.replace('Temporada', 'temporada')
|
||||
item.title = item.title.strip()
|
||||
item.title = item.title.replace(' ', '-')
|
||||
|
||||
item.title = 'temporada-%s'%item.temp.zfill(2)
|
||||
patron = '<li><a href=(.*?)>.*?(Capitulo|Pelicula).*?(\d+).*?<'
|
||||
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
@@ -185,8 +179,7 @@ def episodiosxtemp(item):
|
||||
url=url,
|
||||
thumbnail=item.thumbnail,
|
||||
plot=plot,
|
||||
language=item.language,
|
||||
quality=item.quality,
|
||||
language=language,
|
||||
contentSerieName=item.contentSerieName,
|
||||
context=item.context
|
||||
))
|
||||
@@ -218,7 +211,7 @@ def episodiosxtemp(item):
|
||||
url=url,
|
||||
thumbnail=item.thumbnail,
|
||||
plot=plot,
|
||||
language=item.language,
|
||||
language=language,
|
||||
contentSerieName=item.contentSerieName,
|
||||
context=item.context
|
||||
))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
import urlparse
|
||||
@@ -10,11 +10,28 @@ from core import scrapertoolsV2
|
||||
from core import servertools
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
from channels import autoplay
|
||||
|
||||
|
||||
|
||||
HOST = "https://seriesblanco.com/"
|
||||
IDIOMAS = {'es': 'Español', 'en': 'Inglés', 'la': 'Latino', 'vo': 'VO', 'vos': 'VOS', 'vosi': 'VOSI', 'otro': 'OVOS'}
|
||||
list_idiomas = IDIOMAS.values()
|
||||
list_language = ['default']
|
||||
CALIDADES = ['SD', 'HDiTunes', 'Micro-HD-720p', 'Micro-HD-1080p', '1080p', '720p']
|
||||
list_quality = CALIDADES
|
||||
|
||||
list_servers = ['streamix',
|
||||
'powvideo',
|
||||
'streamcloud',
|
||||
'openload',
|
||||
'flashx',
|
||||
'streamplay',
|
||||
'nowvideo',
|
||||
'gamovideo',
|
||||
'kingvid',
|
||||
'vidabc'
|
||||
]
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
@@ -25,6 +42,8 @@ def mainlist(item):
|
||||
thumb_buscar = get_thumb("search.png")
|
||||
|
||||
itemlist = list()
|
||||
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
itemlist.append(Item(channel=item.channel, title="Listado alfabético", action="series_listado_alfabetico",
|
||||
thumbnail=thumb_series_az))
|
||||
itemlist.append(Item(channel=item.channel, title="Todas las series", action="series",
|
||||
@@ -45,6 +64,7 @@ def mainlist(item):
|
||||
|
||||
itemlist = filtertools.show_option(itemlist, item.channel, list_idiomas, CALIDADES)
|
||||
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -83,10 +103,11 @@ def extract_series_from_data(item, data):
|
||||
else:
|
||||
action = "findvideos"
|
||||
|
||||
context1=[filtertools.context(item, list_idiomas, CALIDADES), autoplay.context]
|
||||
itemlist.append(item.clone(title=name, url=urlparse.urljoin(HOST, url),
|
||||
action=action, show=name,
|
||||
thumbnail=img,
|
||||
context=filtertools.context(item, list_idiomas, CALIDADES)))
|
||||
context=context1))
|
||||
|
||||
more_pages = re.search('pagina=([0-9]+)">>>', data)
|
||||
if more_pages:
|
||||
@@ -196,7 +217,7 @@ def episodios(item):
|
||||
idiomas = " ".join(["[%s]" % IDIOMAS.get(language, "OVOS") for language in
|
||||
re.findall("banderas/([^\.]+)", flags, re.MULTILINE)])
|
||||
filter_lang = idiomas.replace("[", "").replace("]", "").split(" ")
|
||||
display_title = "%s - %s %s" % (item.show, title, idiomas)
|
||||
display_title = "%s - %s" % (item.show, title)
|
||||
# logger.debug("Episode found %s: %s" % (display_title, urlparse.urljoin(HOST, url)))
|
||||
itemlist.append(item.clone(title=display_title, url=urlparse.urljoin(HOST, url),
|
||||
action="findvideos", plot=plot, fanart=fanart, language=filter_lang))
|
||||
@@ -241,14 +262,14 @@ def parse_videos(item, type_str, data):
|
||||
regex = re.compile('microhd', re.I)
|
||||
quality = regex.sub("Micro-HD-", quality)
|
||||
# quality = re.sub(r"microhd", "Micro-HD-", quality, flags=re.IGNORECASE)
|
||||
|
||||
server = v_fields.get("server")
|
||||
title = "%s en %s [%s] [%s] (%s: %s)" % (type_str, v_fields.get("server"),
|
||||
IDIOMAS.get(v_fields.get("language"), "OVOS"), quality,
|
||||
v_fields.get("uploader"), v_fields.get("date"))
|
||||
itemlist.append(
|
||||
item.clone(title=title, fulltitle=item.title, url=urlparse.urljoin(HOST, v_fields.get("link")),
|
||||
action="play", language=IDIOMAS.get(v_fields.get("language"), "OVOS"),
|
||||
quality=quality))
|
||||
quality=quality, server= server))
|
||||
|
||||
if len(itemlist) > 0:
|
||||
return itemlist
|
||||
@@ -268,7 +289,6 @@ def findvideos(item):
|
||||
# logger.info(data)
|
||||
|
||||
online = extract_videos_section(data)
|
||||
|
||||
try:
|
||||
filtro_enlaces = config.get_setting("filterlinks", item.channel)
|
||||
except:
|
||||
@@ -284,6 +304,16 @@ def findvideos(item):
|
||||
|
||||
list_links = filtertools.get_links(list_links, item, list_idiomas, CALIDADES)
|
||||
|
||||
for i in range(len(list_links)):
|
||||
a=list_links[i].title
|
||||
b=a.lstrip('Ver en')
|
||||
c=b.split('[')
|
||||
d=c[0].rstrip( )
|
||||
d=d.lstrip( )
|
||||
list_links[i].server=d
|
||||
|
||||
autoplay.start(list_links, item)
|
||||
|
||||
return list_links
|
||||
|
||||
|
||||
|
||||
2
plugin.video.alfa/channels/seriesdanko.py
Executable file → Normal file
2
plugin.video.alfa/channels/seriesdanko.py
Executable file → Normal file
@@ -10,7 +10,7 @@ from core import servertools
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
|
||||
HOST = 'https://seriesdanko.info/'
|
||||
HOST = 'http://seriesdanko.to/'
|
||||
IDIOMAS = {'es': 'Español', 'la': 'Latino', 'vos': 'VOS', 'vo': 'VO'}
|
||||
list_idiomas = IDIOMAS.values()
|
||||
CALIDADES = ['SD', 'MicroHD', 'HD/MKV']
|
||||
|
||||
@@ -10,6 +10,17 @@ from core import servertools
|
||||
from core import tmdb
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
from channels import autoplay
|
||||
|
||||
IDIOMAS = {'latino': 'Latino'}
|
||||
list_language = IDIOMAS.values()
|
||||
list_servers = ['openload',
|
||||
'okru',
|
||||
'netutv',
|
||||
'rapidvideo'
|
||||
]
|
||||
list_quality = ['default']
|
||||
|
||||
|
||||
host = "https://serieslan.com"
|
||||
|
||||
@@ -17,12 +28,14 @@ host = "https://serieslan.com"
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
thumb_series = get_thumb("channels_tvshow.png")
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
|
||||
itemlist = list()
|
||||
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, action="lista", title="Series", url=host, thumbnail=thumb_series, page=0))
|
||||
itemlist = renumbertools.show_option(item.channel, itemlist)
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -48,8 +61,9 @@ def lista(item):
|
||||
title = name
|
||||
url = host + link
|
||||
scrapedthumbnail = host + img
|
||||
context1=[renumbertools.context(item), autoplay.context]
|
||||
itemlist.append(item.clone(title=title, url=url, action="episodios", thumbnail=scrapedthumbnail, show=title,
|
||||
context=renumbertools.context(item)))
|
||||
context=context1))
|
||||
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, title="Página Siguiente >>", url=item.url, action="lista", page=item.page + 1))
|
||||
@@ -76,7 +90,7 @@ def episodios(item):
|
||||
for cap, link, name in matches:
|
||||
|
||||
title = ""
|
||||
pat = "as/sd"
|
||||
pat = "/"
|
||||
# varios episodios en un enlace
|
||||
if len(name.split(pat)) > 1:
|
||||
i = 0
|
||||
@@ -164,6 +178,7 @@ def findvideos(item):
|
||||
itemlist.append(Item(channel=item.channel, action="play", title=title, show=show, url=video_url, plot=item.plot,
|
||||
thumbnail=thumbnail, server=server, folder=False))
|
||||
|
||||
autoplay.start(itemlist, item)
|
||||
return itemlist
|
||||
else:
|
||||
return []
|
||||
|
||||
@@ -7,9 +7,20 @@ from channels import renumbertools
|
||||
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
|
||||
from channels import autoplay
|
||||
|
||||
IDIOMAS = {'latino': 'Latino', 'español':'Español'}
|
||||
list_language = IDIOMAS.values()
|
||||
list_servers = ['openload',
|
||||
'sendvid',
|
||||
'netutv',
|
||||
'rapidvideo'
|
||||
]
|
||||
list_quality = ['default']
|
||||
|
||||
host = "https://seriesmeme.com/"
|
||||
|
||||
@@ -19,7 +30,7 @@ def mainlist(item):
|
||||
|
||||
thumb_series = get_thumb("channels_tvshow.png")
|
||||
thumb_series_az = get_thumb("channels_tvshow_az.png")
|
||||
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
itemlist = list()
|
||||
|
||||
itemlist.append(Item(channel=item.channel, action="lista_gen", title="Novedades", url=host,
|
||||
@@ -33,6 +44,7 @@ def mainlist(item):
|
||||
itemlist.append(Item(channel=item.channel, action="top", title="Top Series", url=host,
|
||||
thumbnail=thumb_series))
|
||||
itemlist = renumbertools.show_option(item.channel, itemlist)
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -129,9 +141,10 @@ def lista_gen(item):
|
||||
if 'HD' in scrapedlang:
|
||||
scrapedlang = scrapedlang.replace('HD', '')
|
||||
title = scrapedtitle + " [ " + scrapedlang + "]"
|
||||
context1=[renumbertools.context(item), autoplay.context]
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, title=title, url=scrapedurl, thumbnail=scrapedthumbnail, action="episodios",
|
||||
show=scrapedtitle, context=renumbertools.context(item)))
|
||||
show=scrapedtitle, context=context1))
|
||||
tmdb.set_infoLabels(itemlist)
|
||||
# Paginacion
|
||||
|
||||
@@ -194,3 +207,18 @@ def episodios(item):
|
||||
action="add_serie_to_library", extra="episodios", show=show))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
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
|
||||
|
||||
autoplay.start(itemlist, item)
|
||||
|
||||
return itemlist
|
||||
|
||||
@@ -28,7 +28,12 @@
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "okru",
|
||||
"id": {
|
||||
"value": [
|
||||
"okru",
|
||||
"ok.ru"
|
||||
]
|
||||
},
|
||||
"name": "okru",
|
||||
"settings": [
|
||||
{
|
||||
|
||||
@@ -20,7 +20,12 @@
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "vimpleru",
|
||||
"id": {
|
||||
"value": [
|
||||
"vimpleru",
|
||||
"vimple"
|
||||
]
|
||||
},
|
||||
"name": "vimpleru",
|
||||
"settings": [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user