

Mensaje por robalo » 21 Nov 2016, 21:50
Mensaje por robalo » 22 Nov 2016, 20:05
No se yo quien es el que se "incomada". Yo no soy programador y no me "incomoda"DanielyD http://www.mimediacenter.info/foro/viewtopic.php?f=24&t=4689&start=230#p36282 escribió:Buenas tardes, no se que tan fácil sea agregar estos canales, pero se ven como buenos, si algo también deseo colaborar, pero no se mucho, solo programar jeje
http://www.batmanonlinelatino.com.mx/
http://www.limatoons.com/
Mensaje por dariomo » 25 Nov 2016, 09:29
robalo escribió:streamplay:EDITO: El code está con 'from core.scrapertools import *'. Los 'find_single_match' se tiene que modificar por 'scrapertools.find_single_match' si se usa 'from core import scrapertools'Código: Seleccionar todo
[....] jj_encode = find_single_match(data, "(\w+=~\[\];.*?\)\(\)\)\(\);)") ## -- Añadida la variable 'reverse' ------------------------------- jj_decode = None; jj_patron = None; reverse = False ## -- ------------------------------------------------------------- if jj_encode: jj_decode = jjdecode(jj_encode) if jj_decode: jj_patron = find_single_match(jj_decode, "/([^/]+)/") ## -- Nuevo ------------------------------------------------------- if not "(" in jj_patron: jj_patron = "(" + jj_patron if not ")" in jj_patron: jj_patron+= ")" if "x72x65x76x65x72x73x65" in jj_decode: reverse = True ## -- ------------------------------------------------------------- [....] video_urls = [] for video_url in matches: ## -- Nuevo --------------------------------------------------- if reverse: reverse = find_single_match(video_url, '\w{40,}')[::-1] video_url = re.sub(r'\w{40,}', reverse, video_url) ## -- --------------------------------------------------------- [....]
Mensaje por dariomo » 25 Nov 2016, 09:46
Código: Seleccionar todo
# -*- coding: utf-8 -*-
#------------------------------------------------------------
# pelisalacarta - XBMC Plugin
# Conector para streamplay
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#------------------------------------------------------------
import re
from jjdecode import JJDecoder
from core import jsunpack
from core import logger
from core import scrapertools
def test_video_exists( page_url ):
logger.info("pelisalacarta.streamplay test_video_exists(page_url='%s')" % page_url)
data = scrapertools.cache_page(page_url)
if data == "File was deleted":
return False, "[Streamplay] El archivo no existe o ha sido borrado"
return True, ""
def get_video_url( page_url , premium = False , user="" , password="", video_password="" ):
logger.info("pelisalacarta.streamplay get_video_url(page_url='%s')" % page_url)
data = scrapertools.cache_page(page_url)
jj_encode = scrapertools.find_single_match(data, "(\w+=~\[\];.*?\)\(\)\)\(\);)")
## -- Añadida la variable 'reverse' -------------------------------
jj_decode = None; jj_patron = None; reverse = False
## -- -------------------------------------------------------------
if jj_encode: jj_decode = jjdecode(jj_encode)
if jj_decode: jj_patron = scrapertools.find_single_match(jj_decode, "/([^/]+)/")
## -- Nuevo -------------------------------------------------------
if not "(" in jj_patron: jj_patron = "(" + jj_patron
if not ")" in jj_patron: jj_patron+= ")"
if "x72x65x76x65x72x73x65" in jj_decode: reverse = True
## -- -------------------------------------------------------------
matches = scrapertools.find_single_match(data, "<script type=[\"']text/javascript[\"']>(eval.*?)</script>")
matchjs = jsunpack.unpack(matches).replace("\\", "")
matches = scrapertools.find_multiple_matches(matchjs, ',file:"([^"]+)"')
video_urls = []
for video_url in matches:
## -- Nuevo ---------------------------------------------------
if reverse:
reverse = scrapertools.find_single_match(video_url, '\w{40,}')[::-1]
video_url = re.sub(r'\w{40,}', reverse, video_url)
## -- ---------------------------------------------------------
mediaurl = re.sub(r'%s' % jj_patron, r'\1', mediaurl)
video_urls.append([filename + " [streamplay]", mediaurl])
video_urls.sort(key=lambda x:x[0], reverse=True)
for video_url in video_urls:
logger.info("[streamplay.py] %s - %s" % (video_url[0], video_url[1]))
return video_urls
# Encuentra vídeos del servidor en el texto pasado
def find_videos(data):
encontrados = set()
devuelve = []
# http://streamplay.to/ubhrqw1drwlx
patronvideos = "streamplay.to/(?:embed-|)([a-z0-9]+)(?:.html|)"
logger.info("pelisalacarta.streamplay find_videos #"+patronvideos+"#")
matches = re.compile(patronvideos, re.DOTALL).findall(data)
for match in matches:
titulo = "[streamplay]"
url = "http://streamplay.to/embed-%s.html" % match
if url not in encontrados:
logger.info(" url="+url)
devuelve.append([titulo, url, 'streamplay'])
encontrados.add(url)
else:
logger.info(" url duplicada="+url)
return devuelve
Mensaje por robalo » 25 Nov 2016, 23:28
Código: Seleccionar todo
# -*- coding: utf-8 -*-
#------------------------------------------------------------
# pelisalacarta - XBMC Plugin
# Conector para streamplay
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#------------------------------------------------------------
from core.scrapertools import *
headers = [
['User-Agent','Mozilla/5.0 (Windows NT 10.0; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0'],
['Host','streamplay.to'],
]
host = "http://streamplay.to/"
def test_video_exists(page_url):
logger.info("pelisalacarta.streamplay test_video_exists(page_url='%s')" % page_url)
data = cache_page(page_url)
if "<title>watch </title>" in data.lower(): return False, "[Streamplay] El archivo no existe o ha sido borrado"
return True, ""
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
logger.info("pelisalacarta.streamplay get_video_url(page_url='%s')" % page_url)
url = page_url.replace(host, host + "embed-") + ".html"
data = cache_page(url)
'''
data = cache_page(page_url, headers=headers)
data = find_multiple_matches(data.replace('"',"'"), "name='([^']+)'\s*value='([^']*)'")
post = urllib.urlencode({k:v for k, v in data})
import time
time.sleep(5)
data = cache_page(page_url, post=post, headers=headers+[['Referer',page_url]])
'''
jj_encode = find_single_match(data, "(\w+=~\[\];.*?\)\(\)\)\(\);)")
jj_decode = None; jj_patron = None; reverse = False; substring = False
if jj_encode: jj_decode = jjdecode(jj_encode)
if jj_decode: jj_patron = find_single_match(jj_decode, "/([^/]+)/")
if not "(" in jj_patron: jj_patron = "(" + jj_patron
if not ")" in jj_patron: jj_patron+= ")"
if "x72x65x76x65x72x73x65" in jj_decode: reverse = True
if "x73x75x62x73x74x72x69x6Ex67" in jj_decode: substring = True
data = find_single_match(data, "<script type=.text/javascript.>(eval\(function\(p,a,c,k,e,d.*?)</script>")
data = unPack(data).replace("\\", "")
data = find_single_match(data, "sources\s*=[^\[]*\[([^\]]+)\]")
matches = find_multiple_matches(data.replace('"', "'"), "[src|file]:'([^']+)'")
video_urls = []
for video_url in matches:
_hash = find_single_match(video_url, '\w{40,}')
if substring:
substring = int(find_single_match(jj_decode, "_\w+.\d...(\d)...;"))
if reverse: _hash = _hash[:-substring]
else: _hash = _hash[substring:]
if reverse: video_url = re.sub(r'\w{40,}', _hash[::-1], video_url)
filename = get_filename_from_url(video_url)[-4:]
if video_url.startswith("rtmp"):
rtmp, playpath = video_url.split("vod/", 1)
video_url = "%s playpath=%s swfUrl=%splayer6/jwplayer.flash.swf pageUrl=%s" % (rtmp + "vod/", playpath, host, page_url)
filename = "RTMP"
elif "m3u8" in video_url:
video_url += "|User-Agent=" + headers[0][1]
elif video_url.endswith("/v.mp4"):
video_url_flv = re.sub(r'/v.mp4$','/v.flv',video_url)
video_urls.append( [ ".flv" + " [powvideo]", re.sub(r'%s' % jj_patron, r'\1', video_url_flv)])
video_urls.append( [ filename + " [powvideo]", re.sub(r'%s' % jj_patron, r'\1', video_url)])
for video_url in video_urls:
logger.info("[streamplay.py] %s - %s" % (video_url[0], video_url[1]))
return video_urls
def find_videos(data):
encontrados = set()
devuelve = []
patronvideos = host + "(?:embed-|iframe-|preview-|)([a-z0-9]+)(?:-\d+[xX]\d.html|.html|)"
logger.info("pelisalacarta.streamplay find_videos #" + patronvideos + "#")
matches = re.compile(patronvideos, re.DOTALL).findall(data)
for match in matches:
titulo = "[streamplay]"
url = host + match
if url not in encontrados:
logger.info(" url=" + url)
devuelve.append([titulo, url, 'streamplay'])
encontrados.add(url)
else:
logger.info(" url duplicada=" + url)
return devuelve
def unPack(packed):
pattern = "}\('(.*)', *(\d+), *(\d+), *'(.*)'\.split\('([^']+)'\)"
d = [ d for d in re.search(pattern, packed, re.DOTALL).groups() ]
p = d[0]; a = int(d[1]); c = int(d[2]); k = d[3].split(d[4])
if a <= 62: toString = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
else: toString = """ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~"""
def e(c):
return toString[c] if c < a else toString[c // a] + toString[c % a]
while c > 0:
c-= 1
if k[c]: x = e(c)
else: x = k[c]
y = k[c]
p = re.sub(r"(\b%s\b)" % x, y, p)
return p
def jjdecode(t):
x = '0123456789abcdef'
j = get_match(t, '^([^=]+)=')
t = t.replace(j + '.', 'j.')
t = re.sub(r'^.*?"\\""\+(.*?)\+"\\"".*?$', r'\1', t.replace('\\\\', '\\')) + '+""'
t = re.sub('(\(!\[\]\+""\)\[j\._\$_\])', '"l"', t)
t = re.sub(r'j\._\$\+', '"o"+', t)
t = re.sub(r'j\.__\+', '"t"+', t)
t = re.sub(r'j\._\+', '"u"+', t)
p = find_multiple_matches(t, '(j\.[^\+]+\+)')
for c in p:
t = t.replace(c, c.replace('_', '0').replace('$', '1'))
p = find_multiple_matches(t, 'j\.(\d{4})')
for c in p:
t = re.sub(r'j\.%s' % c, '"' + x[int(c, 2)] + '"', t)
p = find_multiple_matches(t, '\\"\+j\.(001)\+j\.(\d{3})\+j\.(\d{3})\+')
for c in p:
t = re.sub(r'\\"\+j\.%s\+j\.%s\+j\.%s\+' % (c[0], c[1], c[2]), chr(int("".join(c), 2)) + '"+', t)
p = find_multiple_matches(t, '\\"\+j\.(\d{3})\+j\.(\d{3})\+')
for c in p:
t = re.sub(r'\\"\+j\.%s\+j\.%s\+' % (c[0], c[1]), chr(int("".join(c),2)) + '"+', t)
p = find_multiple_matches(t, 'j\.(\d{3})')
for c in p:
t = re.sub(r'j\.%s' % c, '"' + str(int(c, 2)) + '"', t)
r = re.sub(r'"\+"|\\\\','',t[1:-1])
return r
Mensaje por dentaku65 » 26 Nov 2016, 12:13
Hi Robalo,robalo escribió:Para el nuevo cambio en flashx y para que no se trague los 3 fakes y nos muestre el correcto se puede hacer algo parecido a lo siguiente:Código: Seleccionar todo
matches = scrapertools.find_multiple_matches(data, "<script type='text/javascript'>(.*?)</script>") for m in matches: if m.startswith("eval"): try: m = jsunpack.unpack(m) not_fake = scrapertools.find_single_match(m, "(\w{40,})") if not_fake: break except: m = "" match = m
Volver a “Problemas (no me funciona...)”
Este es el foro oficial de soporte para pelisalacarta, tvalacarta y mywebtv.
También es un lugar para compartir tus experiencias con dispositivos multimedia y software media center, puede que encuentres algo interesante que ni siquiera sabías que se podía hacer.
Si estás empezando con Kodi, o si estás interesado en sacarle más partido, puedes echar un vistazo a esta colección de video-tutoriales.
Aprenderás a crear y optimizar tu biblioteca, a instalar add-ons, a buscar subtítulos...
Si tienes un problema en alguno de los plugins y quieres reportarlo, no olvides incluir el log.
Para que resulte útil tienes que activar la opción de "log completo" en el plugin, luego reiniciar Kodi y dar los pasos necesarios hasta que se produzca el problema.
Luego copia tu fichero de log, siguiendo las instrucciones que se describen en este enlace, e inclúyelo al final de la descripción de tu problema.
Si sabes programar, esta serie de tutoriales que describen paso a paso cómo desarrollar tu propio add-on para Kodi.
Y si quieres añadir tus propios canales a pelisalacarta también te contamos paso a paso cómo hacerlo en este enlace.
Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 12 invitados