please help how to add new website for your plugin:(
Help needed to add new channels to pelisalacarta
Help needed to add new channels to pelisalacarta
Mensaje por jesus » 16 Jul 2009, 06:18
Re: Help needed to add new channels to pelisalacarta
Mensaje por jesus » 16 Jul 2009, 06:19
Publicidad
Re: Help needed to add new channels to pelisalacarta
Mensaje por jesus » 16 Jul 2009, 06:19
http://www.tvfilmy.pl/ and http://www.wyluzujsie.pl/infusions/movie/movie.php you are the best
Re: Help needed to add new channels to pelisalacarta
Mensaje por jesus » 16 Jul 2009, 06:20
my mail piogrys@hotmail.com maybe you can send for mi something help how modified your code .and with one script must be modified
Re: Help needed to add new channels to pelisalacarta
Mensaje por jesus » 16 Jul 2009, 06:40
1) Add the new channel in channelselector.py. This script shows the channel list, and you will see the actual channels this way:
Código: Seleccionar todo
addfolder("Pintadibujos","pintadibujos","mainlist")
addfolder("DeLaTV","delatv","mainlist")
addfolder("Yotix.tv","yotix","mainlist")
In your case this will be:
Código: Seleccionar todo
addfolder("tvfilmy.pl","tvfilmy","mainlist")
Código: Seleccionar todo
tvfilmy.png
Código: Seleccionar todo
tvfilmy.py
Código: Seleccionar todo
CHANNELNAME = "tvfilmy"
Código: Seleccionar todo
url = "http://www.tvfilmy.pl/"
Código: Seleccionar todo
patron = '<div class="item">[^<]+'
matches = re.compile(patron,re.DOTALL).findall(data)
Re: Help needed to add new channels to pelisalacarta
Mensaje por jesus » 16 Jul 2009, 06:55
Código: Seleccionar todo
<div class="middle"><div class="text">
<p><a href="index.php?p=ogladaj&id=1551" title="Tsotsi / Thug [2005] Lektor" ><img src="images/1240658045_Tsotsi (2005) lektor.jpg"
Your regular expression should be something like this
Código: Seleccionar todo
patron='<div class="middle"><div class="text">[^<]+<p><a href="([^"]+)" title="([^"]+)" ><img src="([^"]+)"
- The fragment [^<]+ means continue until you find the character <
The fragment [^"]+ means continue until you find the character "
When you put somethig between "(" and ")", you mark it as something you need to extract later
Código: Seleccionar todo
# Title of the movie in the list
scrapedtitle = match[1]
# URL for the detail page of the movie (in the example is relative to the actual URL)
scrapedurl = urlparse.urljoin(url,match[0])
# Thumbnail for the movie (in the example is relative to the actual URL)
scrapedthumbnail = urlparse.urljoin(url,match[2])
# Plot for the movie
scrapedplot = ""
Código: Seleccionar todo
xbmctools.addthumbnailfolder( CHANNELNAME , scrapedtitle , scrapedurl , scrapedthumbnail, "detail" )
Re: Help needed to add new channels to pelisalacarta
Mensaje por jesus » 16 Jul 2009, 07:08
Código: Seleccionar todo
listavideos = servertools.findvideos(data)
Código: Seleccionar todo
xbmctools.addvideo( CHANNELNAME , "Megavideo - "+video[0] , video[1] , category , video[2] )
Código: Seleccionar todo
xbmctools.playvideo(CHANNELNAME,server,url,category,title,thumbnail,plot)
Re: Help needed to add new channels to pelisalacarta
Mensaje por jesus » 16 Jul 2009, 07:11

When i develop my plugins, i change the resolution of xbmc to 640x480 in Windowed mode. This way i can navigate in the plugin while i watch the log seeing what is happening.
Good luck, and return here with any question.
Re: Help needed to add new channels to pelisalacarta
Mensaje por piogrys » 17 Jul 2009, 01:19
#------------------------------------------------------------
# pelisalacarta - XBMC Plugin
# Canal para pintadibujos
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#------------------------------------------------------------
import urlparse,urllib2,urllib,re
import os
import sys
import xbmc
import xbmcgui
import xbmcplugin
import scrapertools
import megavideo
import servertools
import binascii
import xbmctools
CHANNELNAME = "tvfilmy"
# Esto permite su ejecución en modo emulado
try:
pluginhandle = int( sys.argv[ 1 ] )
except:
pluginhandle = ""
# Traza el inicio del canal
xbmc.output("[tvfilmy.py] init")
DEBUG = True
def mainlist(params,url,category):
xbmc.output("[tvfilmy.py.] mainlist")
url = "http://www.tvfilmy.pl/"
# Descarga la página
data = scrapertools.cachePage(url)
#xbmc.output(data)
# Extrae las entradas (carpetas)
patronvideos = '<div class="item">[^<]+'
patronvideos ='<div class="middle"><div class="text">[^<]+<p><a href="([^"]+)" title="([^"]+)" ><img src="([^"]+)"'
matches = re.compile(patronvideos,re.DOTALL).findall(data)
scrapertools.printMatches(matches)
for match in matches:
# Titulo
scrapedtitle = match[1]
# URL
scrapedurl = urlparse.urljoin(url,match[0])
# Thumbnail
scrapedthumbnail = urlparse.urljoin(url,match[2])
# procesa el resto
scrapedplot = ""
# Depuracion
if (DEBUG):
xbmc.output("scrapedtitle="+scrapedtitle)
xbmc.output("scrapedurl="+scrapedurl)
xbmc.output("scrapedthumbnail="+scrapedthumbnail)
xbmc.output("scrapedplot="+scrapedplot)
# Añade al listado de XBMC
xbmctools.addthumbnailfolder( CHANNELNAME , scrapedtitle , scrapedurl , scrapedthumbnail, "detail" )
# Label (top-right)...
xbmcplugin.setPluginCategory( handle=pluginhandle, category=category )
# Disable sorting...
xbmcplugin.addSortMethod( handle=pluginhandle, sortMethod=xbmcplugin.SORT_METHOD_NONE )
# End of directory...
xbmcplugin.endOfDirectory( handle=pluginhandle, succeeded=True )
def detail(params,url,category):
xbmc.output("[tvfilmy.py] detail")
title = params.get("title")
thumbnail = params.get("thumbnail")
xbmc.output("[tvfilmy.py] title="+title)
xbmc.output("[tvfilmy.py] thumbnail="+thumbnail)
# Descarga la página
data = scrapertools.cachePage(url)
#xbmc.output(data)
# ------------------------------------------------------------------------------------
# Busca los enlaces a los videos
# ------------------------------------------------------------------------------------
listavideos = servertools.findvideos(data)
for video in listavideos:
xbmctools.addvideo( CHANNELNAME , "Megavideo - "+video[0] , video[1] , category , video[2] )
# ------------------------------------------------------------------------------------
# Label (top-right)...
xbmcplugin.setPluginCategory( handle=pluginhandle, category=category )
# Disable sorting...
xbmcplugin.addSortMethod( handle=pluginhandle, sortMethod=xbmcplugin.SORT_METHOD_NONE )
# End of directory...
xbmcplugin.endOfDirectory( handle=pluginhandle, succeeded=True )
def play(params,url,category):
xbmc.output("[tvfilmy.py] play")
title = unicode( xbmc.getInfoLabel( "ListItem.Title" ), "utf-8" )
thumbnail = xbmc.getInfoImage( "ListItem.Thumb" )
plot = unicode( xbmc.getInfoLabel( "ListItem.Plot" ), "utf-8" )
server = params["server"]
xbmc.output("[tvfilmy.py] thumbnail="+thumbnail)
xbmc.output("[tvfilmy.py] server="+server)
xbmctools.playvideo(CHANNELNAME,server,url,category,title,thumbnail,plot)
#mainlist(None,"","mainlist")
#detail(None,"http://impresionante.tv/ponyo.html","play")
- Ayuda sobre plugins
- ↳ tvalacarta
- ↳ Problemas (no me funciona...)
- ↳ Preguntas (cómo se hace...)
- ↳ Sugerencias (estaría bien que hubiera...)
- ↳ pelisalacarta
- ↳ Problemas (no me funciona...)
- ↳ Preguntas (cómo se hace...)
- ↳ Sugerencias (estaría bien que hubiera...)
- ↳ pelisalacarta (For Italian users)
- ↳ Problemi (Non mi funziona...)
- ↳ Domande (Come fare a...)
- ↳ Suggerimenti (Sarebbe bello che...)
- ↳ mywebtv
- ↳ Problemas (no me funciona...)
- ↳ Preguntas (cómo se hace...)
- ↳ Sugerencias (estaría bien que hubiera...)
- ↳ MediaExplorer
- ↳ Balandro
- ↳ Otros plugins
- ↳ Alfa
- ↳ Alfa (For Italian users)
- ↳ Tutoriales
- Ayuda sobre mediacenters
- ↳ XBMC / Kodi
- ↳ Plex
- ↳ Android
- ↳ Raspberry Pi
- ↳ Boxee
- ↳ WiiMC
- ↳ Enigma 2
- ↳ Otros media center
- Sugerencias
- ↳ Nuevos canales
- ↳ Mejoras
- Desarrolladores
- Comunidad
¿Qué es Mi media center?
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.
Primeros pasos en Kodi
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...
Cómo reportar un problema
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.
Aprende a programar para Kodi
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.
¿Quién está conectado?
Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 7 invitados