#id_torrent = scrapertools.get_match(item.url,"(\d+)-")
url_torrent = scrapertools.get_match(item.url,"id="file" href="([^"]+)")
Mensaje por robalo » 08 Oct 2014, 15:16
Mensaje por neno1978 » 08 Oct 2014, 18:40
Mensaje por robalo » 08 Oct 2014, 21:09
Código: Seleccionar todo
patron = 'id="([^"]+)" href="([^"]+)"'
matches = re.compile(patron,re.DOTALL).findall(data)
for title_torrent, url_torrent in matches:
title_torrent = "["+title_torrent.replace("file","torrent")+"]"
itemlist.append( Item(channel=__channel__, title = title_torrent , action="play", url=url_torrent, server="torrent", folder=False) )
Mensaje por neno1978 » 09 Oct 2014, 08:42
Código: Seleccionar todo
def findvideos(item):
logger.info("pelisalacarta.cuelgame findvideos")
itemlist = []
data = scrapertools.cache_page(item.url)
#id_torrent = scrapertools.get_match(item.url,"(\d+)-")
patron = '<a id.*? href="([^"]+)"'
url_torrent = scrapertools.get_match(data, patron)
itemlist.append( Item(channel=__channel__, title = "[torrent]", action="play", url=url_torrent, server="torrent", folder=False) )
Mensaje por robalo » 09 Oct 2014, 09:49
Mensaje por neno1978 » 09 Oct 2014, 12:06
Código: Seleccionar todo
# -*- coding: utf-8 -*-
#------------------------------------------------------------
# pelisalacarta - XBMC Plugin
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#------------------------------------------------------------
import urlparse,urllib2,urllib,re
import os, sys
from core import logger
from core import config
from core import scrapertools
from core.item import Item
from servers import servertools
__channel__ = "cuelgame"
__category__ = "F"
__type__ = "generic"
__title__ = "Cuélgame"
__language__ = "ES"
DEBUG = config.get_setting("debug")
def isGeneric():
return True
def mainlist(item):
logger.info("pelisalacarta.cuelgame mainlist")
itemlist = []
itemlist.append( Item(channel=__channel__, title="Películas" , action="peliculas", url="http://www.bricocine.com/c/hd-microhd/"))
itemlist.append( Item(channel=__channel__, title="Series" , action="peliculas", url="http://www.bricocine.com/c/series"))
return itemlist
def peliculas(item):
logger.info("pelisalacarta.cuelgame peliculas")
itemlist = []
# Descarga la página
data = scrapertools.cache_page(item.url)
'''
<div class="post-10888 post type-post status-publish format-standard hentry category-the-leftovers tag-ciencia-ficcion tag-drama tag-fantasia tag-misterio"><div class="entry"> <a href="http://www.bricocine.com/10888/leftovers-temporada-1/"> <img src="http://www.bricocine.com/wp-content/plugins/wp_movies/files/thumb_185_the_leftovers_.jpg" alt="The Leftovers " /> </a></div><div class="entry-meta"><div class="clearfix"><div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating" class="rating" title="Puntos IMDB: 7.4"><div class="rating-stars imdb-rating"><div class="stars" style="width:74%"></div></div><div itemprop="ratingValue" class="rating-number"> 7.4</div></div><div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating" class="rating" title="Puntos Bricocine: 6.2"><div class="rating-stars brico-rating"><div class="stars" style="width:62%"></div></div><div itemprop="ratingValue" class="rating-number"> 6.2</div></div> <span class="vcard author none"> Publicado por <a class="fn" href="" rel="author" target="_blank"></a> </span> <span class="date updated none">2014-10-07T23:36:17+00:00</span></div></div><h2 class="title2 entry-title"> <a href="http://www.bricocine.com/10888/leftovers-temporada-1/"> The Leftovers – Temporada 1 </a></h2></div> </article> <article class="hentry item-entry"><div class="post-10088 post type-post status-publish format-standard hentry category-the-last-ship tag-accion tag-ciencia-ficcion tag-drama tag-the tag-thriller"><div class="entry"> <a href="http://www.bricocine.com/10088/last-ship-temporada-1/"> <img src="http://www.bricocine.com/wp-content/plugins/wp_movies/files/thumb_185_the_last_ship_.jpg" alt="The Last Ship " /> </a></div><div class="entry-meta"><div class="clearfix"><div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating" class="rating" title="Puntos IMDB: 7.4"><div class="rating-stars imdb-rating"><div class="stars" style="width:74%"></div></div><div itemprop="ratingValue" class="rating-number"> 7.4</div></div><div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating" class="rating" title="Puntos Bricocine: 7.0"><div class="rating-stars brico-rating"><div class="stars" style="width:70%"></div></div><div itemprop="ratingValue" class="rating-number"> 7.0</div></div> <span class="vcard author none"> Publicado por <a class="fn" href="" rel="author" target="_blank"></a> </span> <span class="date updated none">2014-10-07T23:32:25+00:00</span></div></div><h2 class="title2 entry-title"> <a href="http://www.bricocine.com/10088/last-ship-temporada-1/"> The Last Ship – Temporada 1 </a></h2></div> </article> <article class="hentry item-entry">
'''
patron = '<div class=.*?> '
patron += '<a href="([^"]+)"> '
patron += '<img src="([^"]+)".*?'
patron += 'alt="([^"]+)".*?'
patron += 'class="rating-number">([^<]+)</div></div>'
matches = re.compile(patron,re.DOTALL).findall(data)
scrapertools.printMatches(matches)
for scrapedurl, scrapedthumbnail, scrapedtitle, scrapedcreatedate in matches:
scrapedtitle = scrapedtitle + "(Puntuación:" + scrapedcreatedate + ")"
itemlist.append( Item(channel=__channel__, title=scrapedtitle, url=scrapedurl, action="findvideos", thumbnail=scrapedthumbnail, folder=True) )
# Extrae el paginador
patronvideos = '<a href="([^"]+)" title="Siguiente">Siguiente</a>'
matches = re.compile(patronvideos,re.DOTALL).findall(data)
scrapertools.printMatches(matches)
if len(matches)>0:
scrapedurl = urlparse.urljoin(item.url,matches[0])
itemlist.append( Item(channel=__channel__, action="peliculas", title="siguiente>>" , url=scrapedurl , folder=True) )
return itemlist
def findvideos(item):
logger.info("pelisalacarta.cuelgame findvideos")
itemlist = []
data = scrapertools.cache_page(item.url)
#id_torrent = scrapertools.get_match(item.url,"(\d+)-")
patron = 'id="([^"]+)" href="([^"]+)"'
matches = re.compile(patron,re.DOTALL).findall(data)
for title_torrent, url_torrent in matches:
title_torrent = "["+title_torrent.replace("file","torrent")+"]"
itemlist.append( Item(channel=__channel__, title = title_torrent , action="play", url=url_torrent, server="torrent", folder=False) )
return itemlist
Mensaje por neno1978 » 09 Oct 2014, 12:40
Código: Seleccionar todo
#id_torrent = scrapertools.get_match(item.url,"(\d+)-")
patron = 'id="([^"]+)" href="([^"]+)"'
matches = re.compile(patron,re.DOTALL).findall(data)
for title_torrent, url_torrent in matches:
title_torrent = "["+title_torrent.replace("file","torrent")+"]"
itemlist.append( Item(channel=__channel__, title = title_torrent , action="play", url=url_torrent, server="torrent", folder=False) )
Código: Seleccionar todo
patron = '<table class="table table-series".*? '
patron += '<span class="title">([^<]+)</span>.*?'
patron += '<a id.*? href="([^"]+)"'
Código: Seleccionar todo
patron = 'id="([^"]+)" href="([^"]+)"'
Mensaje por neno1978 » 09 Oct 2014, 20:42
Código: Seleccionar todo
def findvideos(item):
logger.info("pelisalacarta.cuelgame findvideos")
itemlist = []
data = scrapertools.cache_page(item.url)
#id_torrent = scrapertools.get_match(item.url,"(\d+)-")
patron = '<span class="title">([^"]+)</span>.*?'
patron += 'id="([^"]+)" href="([^"]+)"'
matches = re.compile(patron,re.DOTALL).findall(data)
for title_torrent, scrapedtitle, url_torrent in matches:
title_torrent = "["+title_torrent.replace("file","torrent")+"]"
itemlist.append( Item(channel=__channel__, title = title_torrent , action="play", url=url_torrent, server="torrent", folder=False) )
return itemlist
Mensaje por robalo » 09 Oct 2014, 22:32
Código: Seleccionar todo
patron = '<span class="title">([^"]+)</span>.*?'
patron += 'id="([^"]+)" href="([^"]+)".*?'
patron += 'id="([^"]+)" href="([^"]+)"'
matches = re.compile(patron,re.DOTALL).findall(data)
for title_links, title_torrent, url_torrent, title_magnet, url_magnet in matches:
## torrent
title_torrent = "["+title_torrent.replace("file","torrent")+"]"
title_torrent = title_links+"- "+title_torrent
itemlist.append( Item(channel=__channel__, title = title_torrent , action="play", url=url_torrent, server="torrent", folder=False) )
## magnet
title_magnet = "["+title_magnet+"]"
title_magnet = title_links+"- "+title_magnet
itemlist.append( Item(channel=__channel__, title = title_magnet , action="play", url=url_magnet, server="torrent", folder=False) )
Volver a “Preguntas (cómo se hace...)”
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: Ahrefs [Bot] y 12 invitados