def busqueda(params, url, category): logger.info("busqueda") tecleado = "" keyboard = xbmc.Keyboard('') keyboard.doModal() if (keyboard.isConfirmed()): tecleado = keyboard.getText() if len(tecleado) <= 0: return tecleado = tecleado.replace(" ", "+") data = scrapertools.cachePagePost( "http://www.divxonline.info/buscador.html", 'texto=' + tecleado + '&categoria=0&tipobusqueda=1&Buscador=Buscar') #logger.info(data) data = data[data.find('Se han encontrado un total de'):] #<li><a href="/pelicula/306/100-chicas-2000/">100 chicas (2000)</a></li> patronvideos = '<li><a href="(.+?)">(.+?)</a></li>' matches = re.compile(patronvideos, re.DOTALL).findall(data) if DEBUG: scrapertools.printMatches(matches) for match in matches: xbmctools.addnewfolder(CHANNELNAME, "listmirrors", category, match[1], 'http://www.divxonline.info' + match[0], 'scrapedthumbnail', 'scrapedplot') xbmcplugin.setPluginCategory(handle=int(sys.argv[1]), category=category) xbmcplugin.addSortMethod(handle=int(sys.argv[1]), sortMethod=xbmcplugin.SORT_METHOD_NONE) xbmcplugin.endOfDirectory(handle=int(sys.argv[1]), succeeded=True)
def mainlist(params,url,category): logger.info("[rtvc.py] mainlist") # Empieza con el listado sólo de videos url="http://www.rtvc.es/television/emisiones.aspx" data="ctl00$content$ScriptManager1=ctl00$content$ScriptManager1|ctl00$content$imgVideos&__EVENTTARGET=&__EVENTARGUMENT=&__LASTFOCUS=&__VIEWSTATE=%2FwEPDwULLTEzNjQ1NDg2NTgPZBYCZg9kFgICAxBkZBYEZg9kFgYCAQ8WAh4Fc3R5bGUFDWRpc3BsYXk6bm9uZTtkAgMPFgIfAAUPZGlzcGxheTppbmxpbmU7ZAIFDxYCHwAFDWRpc3BsYXk6bm9uZTtkAgIPZBYOAgMPDxYCHghJbWFnZVVybAUqL2ltYWdlcy93ZWIvYnRuX2VtaXNpb25lc190b2RvX2NoZWNrZWQucG5nZGQCBQ8PFgIfAQUjL2ltYWdlcy93ZWIvYnRuX2VtaXNpb25lc192aWRlby5wbmdkZAIHDw8WAh8BBSMvaW1hZ2Vz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taXNpb24vem9uYS1tb3Rvci10di04NDUzLmFzcHgNWm9uYSBNb3RvciBUVg1ab25hIE1vdG9yIFRWCERlcG9ydGVzIi9yc3MvdGVsZXZpc2lvbi9wcm9ncmFtYS84NDUzLmFzcHhkAjUPZBYCAgEPFQUkL3RlbGV2aXNpb24vZW1pc2lvbi9wcm9tb3MtODQzNi5hc3B4BlByb21vcwZQcm9tb3MFT3Ryb3MiL3Jzcy90ZWxldmlzaW9uL3Byb2dyYW1hLzg0MzYuYXNweGQYAQUeX19Db250cm9sc1JlcXVpcmVQb3N0QmFja0tleV9fFgcFHGN0bDAwJGxvZ2luYnV0dG9ucyRidG5FbnZpYXIFHmN0bDAwJGxvZ2luYnV0dG9ucyRjaGJSZWNvcmRhcgUVY3RsMDAkY29udGVudCRpbWdUb2RvBRdjdGwwMCRjb250ZW50JGltZ1ZpZGVvcwUWY3RsMDAkY29udGVudCRpbWdBdWRpbwUWY3RsMDAkY29udGVudCRpbWdGb3RvcwUUY3RsMDAkY29udGVudCRpbWdQREY%3D&ctl00$loginbuttons$txtUsuario=&ctl00$loginbuttons$txtPassword=&ctl00$content$ddlEmisionesCategoria=0&ctl00$content$typeselected=todo&ctl00$content$imgVideos.x=49&ctl00$content$imgVideos.y=9" # Descarga la página data = scrapertools.cachePagePost(url,data) #logger.info(data) # Extrae las categorías de vídeos patron = '<select name="ctl00$content$ddlEmisionesCategoria"[^>]+>(.*?)</select>' matches = re.compile(patron,re.DOTALL).findall(data) if len(matches)>0: data = matches[0] patron = '<option value="([^"]+)">([^<]+)</option>' matches = re.compile(patron,re.DOTALL).findall(data) for match in matches: # Atributos del vídeo scrapedtitle = match[1].strip() scrapedurl = match[0] scrapedthumbnail = "" scrapedplot = "" if (DEBUG): logger.info("title=["+scrapedtitle+"], url=["+scrapedurl+"], thumbnail=["+scrapedthumbnail+"]") # Añade al listado de XBMC xbmctools.addnewfolder( CHANNELCODE , "programlist" , CHANNELNAME , scrapedtitle , scrapedurl , scrapedthumbnail , scrapedplot ) # Cierra el directorio xbmcplugin.setPluginCategory( handle=int( sys.argv[ 1 ] ), category=category ) xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), sortMethod=xbmcplugin.SORT_METHOD_NONE ) xbmcplugin.endOfDirectory( handle=int( sys.argv[ 1 ] ), succeeded=True )
def busqueda(params,url,category): logger.info("busqueda") tecleado = "" keyboard = xbmc.Keyboard('') keyboard.doModal() if (keyboard.isConfirmed()): tecleado = keyboard.getText() if len(tecleado)<=0: return tecleado = tecleado.replace(" ", "+") data=scrapertools.cachePagePost("http://www.divxonline.info/buscador.html",'texto=' + tecleado + '&categoria=0&tipobusqueda=1&Buscador=Buscar') #logger.info(data) data=data[data.find('Se han encontrado un total de'):] #<li><a href="/pelicula/306/100-chicas-2000/">100 chicas (2000)</a></li> patronvideos = '<li><a href="(.+?)">(.+?)</a></li>' matches = re.compile(patronvideos,re.DOTALL).findall(data) if DEBUG: scrapertools.printMatches(matches) for match in matches: xbmctools.addnewfolder( CHANNELNAME , "listmirrors" , category , match[1] , 'http://www.divxonline.info' + match[0] , 'scrapedthumbnail', 'scrapedplot' ) xbmcplugin.setPluginCategory( handle=int( sys.argv[ 1 ] ), category=category ) xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), sortMethod=xbmcplugin.SORT_METHOD_NONE ) xbmcplugin.endOfDirectory( handle=int( sys.argv[ 1 ] ), succeeded=True )
def findvideos(item): logger.info("[cuevana.py] findvideos") code = "" if (item.url.startswith("http://www.cuevana.tv/list_search_info.php")): data = scrapertools.cachePage(item.url) logger.info("data=" + data) patron = "window.location\='/series/([0-9]+)/" matches = re.compile(patron, re.DOTALL).findall(data) if len(matches) > 0: code = matches[0] logger.info("code=" + code) url = "http://www.cuevana.tv/player/source?id=%s&subs=,ES&onstart=yes&tipo=s&sub_pre=ES" % matches[ 0] else: # http://www.cuevana.tv/peliculas/2553/la-cienaga/ logger.info("url1=" + item.url) patron = "http://www.cuevana.tv/peliculas/([0-9]+)/" matches = re.compile(patron, re.DOTALL).findall(item.url) if len(matches) > 0: code = matches[0] logger.info("code=" + code) url = "http://www.cuevana.tv/player/source?id=%s&subs=,ES&onstart=yes&sub_pre=ES#" % matches[ 0] logger.info("url2=" + url) data = scrapertools.cachePage(url) logger.info("data=" + data) # goSource('ee5533f50eab1ef355661eef3b9b90ec','megaupload') patron = "goSource\('([^']+)','megaupload'\)" matches = re.compile(patron, re.DOTALL).findall(data) if len(matches) > 0: data = scrapertools.cachePagePost( "http://www.cuevana.tv/player/source_get", "key=%s&host=megaupload&vars=&id=2933&subs=,ES&tipo=&sub_pre=ES" % matches[0]) logger.info("data=" + data) listavideos = servertools.findvideos(data) itemlist = [] for video in listavideos: server = video[2] scrapedtitle = item.title + " [" + server + "]" scrapedurl = video[1] itemlist.append( Item(channel=CHANNELNAME, action="play", title=scrapedtitle, url=scrapedurl, thumbnail=item.thumbnail, plot=item.plot, server=server, folder=False)) return itemlist
def videolist(params,url,category): xbmc.output("[tvg.py] videolist") # -------------------------------------------------------- # Descarga la página # -------------------------------------------------------- posturl = url[:39] postdata = url[40:] xbmc.output("posturl="+posturl) xbmc.output("postdata="+postdata) data = scrapertools.cachePagePost(posturl,postdata) #xbmc.output(data) # -------------------------------------------------------- # Extrae los videos # -------------------------------------------------------- patron = '[^<]+<table class="video" onmouseover="[^"]+" onmouseout="[^"]+" onclick="javascript:AbreReproductor\(\'([^\']+)\'[^"]+" >[^<]+<tr>[^<]+<td rowspan="2" class="foto"><img src="([^"]+)"></td>[^<]+<td class="texto">(.*?)</td>' matches = re.compile(patron,re.DOTALL).findall(data) if DEBUG: scrapertools.printMatches(matches) for match in matches: patron2 = "programa=([^&]+)&" matches2 = re.compile(patron2,re.DOTALL).findall(match[0]) scrapedtitle = matches2[0] patron2 = "fecha=([^&]+)&" matches2 = re.compile(patron2,re.DOTALL).findall(match[0]) scrapedtitle = scrapedtitle + " (" + matches2[0] + ")" scrapedurl = "http://www.crtvg.es" + match[0].replace("&","&").replace(" ","%20") scrapedthumbnail = "http://www.crtvg.es"+match[1] scrapedplot = match[2] # Depuracion if (DEBUG): xbmc.output("scrapedtitle="+scrapedtitle) xbmc.output("scrapedurl="+scrapedurl) xbmc.output("scrapedthumbnail="+scrapedthumbnail) # Añade al listado de XBMC xbmctools.addnewvideo( CHANNELCODE , "play" , CHANNELNAME , "" , scrapedtitle , scrapedurl , scrapedthumbnail, scrapedplot ) # 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 findvideos(item): logger.info("[cuevana.py] findvideos") code ="" if (item.url.startswith("http://www.cuevana.tv/list_search_info.php")): data = scrapertools.cachePage(item.url) logger.info("data="+data) patron = "window.location\='/series/([0-9]+)/" matches = re.compile(patron,re.DOTALL).findall(data) if len(matches)>0: code = matches[0] logger.info("code="+code) url = "http://www.cuevana.tv/player/source?id=%s&subs=,ES&onstart=yes&tipo=s&sub_pre=ES" % matches[0] else: # http://www.cuevana.tv/peliculas/2553/la-cienaga/ logger.info("url1="+item.url) patron = "http://www.cuevana.tv/peliculas/([0-9]+)/" matches = re.compile(patron,re.DOTALL).findall(item.url) if len(matches)>0: code = matches[0] logger.info("code="+code) url = "http://www.cuevana.tv/player/source?id=%s&subs=,ES&onstart=yes&sub_pre=ES#" % matches[0] logger.info("url2="+url) data = scrapertools.cachePage(url) logger.info("data="+data) # goSource('ee5533f50eab1ef355661eef3b9b90ec','megaupload') patron = "goSource\('([^']+)','megaupload'\)" matches = re.compile(patron,re.DOTALL).findall(data) if len(matches)>0: data = scrapertools.cachePagePost("http://www.cuevana.tv/player/source_get","key=%s&host=megaupload&vars=&id=2933&subs=,ES&tipo=&sub_pre=ES" % matches[0]) logger.info("data="+data) listavideos = servertools.findvideos(data) itemlist = [] for video in listavideos: server = video[2] scrapedtitle = item.title + " [" + server + "]" scrapedurl = video[1] itemlist.append( Item(channel=CHANNELNAME, action="play" , title=scrapedtitle , url=scrapedurl, thumbnail=item.thumbnail, plot=item.plot, server=server, folder=False)) return itemlist
def categorylist(params,url,category): xbmc.output("[tvg.py] categorylist") # -------------------------------------------------------- # Descarga la página # -------------------------------------------------------- posturl = url[:39] postdata = url[40:] xbmc.output("posturl="+posturl) xbmc.output("postdata="+postdata) data = scrapertools.cachePagePost(posturl,postdata) #xbmc.output(data) # -------------------------------------------------------- # Extrae las carpetas # -------------------------------------------------------- patron = '<table align="center" id="prog_front">[^<]+<tr>[^<]+<th class="cab">[^<]+<strong>([^<]+)</strong>' matches = re.compile(patron,re.DOTALL).findall(data) if DEBUG: scrapertools.printMatches(matches) for match in matches: scrapedtitle = match.rstrip() scrapedurl = "http://www.crtvg.es/tvgacarta/index.asp?tipo=" + category.replace(" ","+") + "&procura=" + match.replace(" ","+") scrapedthumbnail = "" scrapedplot = "" # Depuracion if (DEBUG): xbmc.output("scrapedtitle="+scrapedtitle) xbmc.output("scrapedurl="+scrapedurl) xbmc.output("scrapedthumbnail="+scrapedthumbnail) # Añade al listado de XBMC xbmctools.addnewfolder( CHANNELCODE , "videolist" , scrapedtitle , scrapedtitle , scrapedurl , scrapedthumbnail, scrapedplot ) # 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 programlist(params,url,category): logger.info("[rtvc.py] programlist") # La url es el id del combo de categorías, lo pega dentro del DATA del POST data="ctl00$content$ScriptManager1=ctl00$content$UpdatePanel1|ctl00$content$ddlEmisionesCategoria&__EVENTTARGET=ctl00%24content%24ddlEmisionesCategoria&__EVENTARGUMENT=&__LASTFOCUS=&__VIEWSTATE=%2FwEPDwULLTEzNjQ1NDg2NTgPZBYCZg9kFgICAxBkZBYEZg9kFgYCAQ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0bkVudmlhcgUeY3RsMDAkbG9naW5idXR0b25zJGNoYlJlY29yZGFyBRVjdGwwMCRjb250ZW50JGltZ1RvZG8FF2N0bDAwJGNvbnRlbnQkaW1nVmlkZW9zBRZjdGwwMCRjb250ZW50JGltZ0F1ZGlvBRZjdGwwMCRjb250ZW50JGltZ0ZvdG9zBRRjdGwwMCRjb250ZW50JGltZ1BERg%3D%3D&ctl00$loginbuttons$txtUsuario=&ctl00$loginbuttons$txtPassword=&ctl00$content$ddlEmisionesCategoria="+url+"&ctl00$content$typeselected=video&" url="http://www.rtvc.es/television/emisiones.aspx" # Descarga la página data = scrapertools.cachePagePost(url,data) #logger.info(data) # Extrae los programas patron = '<div class="emision">[^<]+' patron += '<div class="photo">[^<]+' patron += '<img id="[^"]+" src="/handlers/ThumbnailHandler.ashx\?width=90\&\;height=60\&\;fill=False\&\;src=([^"]+)"[^>]+>[^<]+' patron += '</div>[^<]+' patron += '<div class="data">[^<]+' patron += '<a class="title" href="([^"]+)">[^<]+' patron += '<span id="title" title="([^"]+)">[^<]+</span>' matches = re.compile(patron,re.DOTALL).findall(data) for match in matches: # Atributos del vídeo scrapedtitle = match[2].strip() scrapedurl = urlparse.urljoin(url,match[1]) # /handlers/ThumbnailHandler.ashx?width=90&height=60&fill=False&src= #scrapedthumbnail = urlparse.urljoin(url,match[0].replace("&","&")) scrapedthumbnail = urlparse.urljoin(url,match[0].replace(" ","%20")) scrapedplot = "" if (DEBUG): logger.info("title=["+scrapedtitle+"], url=["+scrapedurl+"], thumbnail=["+scrapedthumbnail+"]") # Añade al listado de XBMC xbmctools.addnewfolder( CHANNELCODE , "videolist" , CHANNELNAME , scrapedtitle , scrapedurl , scrapedthumbnail , scrapedplot ) # Cierra el directorio xbmcplugin.setPluginCategory( handle=int( sys.argv[ 1 ] ), category=category ) xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), sortMethod=xbmcplugin.SORT_METHOD_NONE ) xbmcplugin.endOfDirectory( handle=int( sys.argv[ 1 ] ), succeeded=True )