def getotherhost(url, show): plugintools.log( "GetlinkMu " + url ) # pendiente de crear función getotherlinkmu para servidores no conocidos (hay que extraer url) show = plugintools.get_setting( "series_id") # Obtenemos modo de vista del usuario para series TV if show is None: show = "tvshows" elif show == "1": show = "seasons" elif show == "2": show = "fanart" elif show == "3": show = "list" elif show == "4": show = "thumbnail" elif show == "5": show = "movies" elif show == "6": show = "tvshows" elif show == "7": show = "episodes" plugintools.log("show= " + show) plugintools.modo_vista(show) data = scrapertools.get_header_from_response(url, header_to_get="location") plugintools.log("data= " + data) data = data.split(" ") url = data[0].strip() plugintools.log("url final a devolver= " + url) return url plugintools.log("show= " + show) plugintools.modo_vista(show)
def getfilefromtitle(url,title): # Imprime en el log lo que va a descartar logger.info("[downloadtools.py] getfilefromtitle: url="+url ) #logger.info("[downloadtools.py] downloadtitle: title="+urllib.quote_plus( title )) plataforma = config.get_system_platform(); logger.info("[downloadtools.py] getfilefromtitle: plataforma="+plataforma) #nombrefichero = xbmc.makeLegalFilename(title + url[-4:]) if plataforma=="xbox": nombrefichero = title[:38] + url[-4:] nombrefichero = limpia_nombre_excepto_1(nombrefichero) else: nombrefichero = title + url[-4:] if "videobb" in url or "videozer" in url: nombrefichero = title + ".flv" if "videobam" in url: nombrefichero = title+"."+url.rsplit(".",1)[1][0:3] if "filenium" in url: # Content-Disposition filename="filenium_El.Gato.con.Botas.TSScreener.Latino.avi" import scrapertools content_disposition_header = scrapertools.get_header_from_response(url,header_to_get="Content-Disposition") logger.info("content_disposition="+content_disposition_header) partes=content_disposition_header.split("=") nombrefichero = title + partes[1][-5:-1] nombrefichero = limpia_nombre_caracteres_especiales(nombrefichero) logger.info("[downloadtools.py] getfilefromtitle: nombrefichero=%s" % nombrefichero) fullpath = os.path.join( config.get_setting("downloadpath") , nombrefichero ) logger.info("[downloadtools.py] getfilefromtitle: fullpath=%s" % fullpath) return fullpath
def getotherhost(url,show): plugintools.log("GetlinkMu "+url) # pendiente de crear función getotherlinkmu para servidores no conocidos (hay que extraer url) show = plugintools.get_setting("series_id") # Obtenemos modo de vista del usuario para series TV if show is None: show = "tvshows" elif show == "1": show = "seasons" elif show == "2": show = "fanart" elif show == "3": show = "list" elif show == "4": show = "thumbnail" elif show == "5": show = "movies" elif show == "6": show = "tvshows" elif show == "7": show = "episodes" plugintools.log("show= "+show) plugintools.modo_vista(show) data = scrapertools.get_header_from_response(url, header_to_get="location") plugintools.log("data= "+data) data = data.split(" ") url = data[0].strip() plugintools.log("url final a devolver= "+url) return url plugintools.log("show= "+show) plugintools.modo_vista(show)
def getlinkmu(params): loginmu() url = params.get("url") show = plugintools.get_setting("series_id") # Obtenemos modo de vista del usuario para series TV if show is None: show = "tvshows" elif show == "1": show = "seasons" elif show == "2": show = "fanart" elif show == "3": show = "list" elif show == "4": show = "thumbnail" elif show == "5": show = "movies" elif show == "6": show = "tvshows" elif show == "7": show = "episodes" params["page"] = show plugintools.log("show= " + show) plugintools.modo_vista(show) # Iniciamos petición de URL que contiene enlaces al capítulo... data = scrapertools.get_header_from_response(url, header_to_get="location") plugintools.log("data= " + data) data = data.split(" ") url = data[0].strip() plugintools.log("url final= " + url) plugintools.log("url= " + url) from resources.tools.resolvers import * if url.find("allmyvideos") >= 0: plugintools.get_params() url = url.replace("http://allmyvideos.net", "http://www.allmyvideos.net").strip() params["url"] = url allmyvideos(params) elif url.find("streamcloud") >= 0: plugintools.get_params() params["url"] = url streamcloud(params) elif url.find("nowvideo.sx") >= 0: plugintools.get_params() url = url.replace("http://nowvideo.sx", "http://www.nowvideo.sx").strip() params["url"] = url nowvideo(params) elif url.find("vidspot") >= 0: plugintools.get_params() url = url.replace("http://vidspot.net", "http://www.vidpot.net").strip() params["url"] = url vidspot(params) elif url.find("playedto") >= 0: plugintools.get_params() params["url"] = url playedto(params) plugintools.log("show= " + show) plugintools.modo_vista(show)
def getfilefromtitle(url, title): # Imprime en el log lo que va a descartar logger.info("streamondemand.core.downloadtools getfilefromtitle: title=" + title) logger.info("streamondemand.core.downloadtools getfilefromtitle: url=" + url) #logger.info("streamondemand.core.downloadtools downloadtitle: title="+urllib.quote_plus( title )) plataforma = config.get_system_platform() logger.info( "streamondemand.core.downloadtools getfilefromtitle: plataforma=" + plataforma) #nombrefichero = xbmc.makeLegalFilename(title + url[-4:]) import scrapertools if plataforma == "xbox": nombrefichero = title[:38] + scrapertools.get_filename_from_url( url)[-4:] nombrefichero = limpia_nombre_excepto_1(nombrefichero) else: nombrefichero = title + scrapertools.get_filename_from_url(url)[-4:] logger.info( "streamondemand.core.downloadtools getfilefromtitle: nombrefichero=%s" % nombrefichero) if "videobb" in url or "videozer" in url or "putlocker" in url: nombrefichero = title + ".flv" if "videobam" in url: nombrefichero = title + "." + url.rsplit(".", 1)[1][0:3] if "filenium" in url: # Content-Disposition filename="filenium_El.Gato.con.Botas.TSScreener.Latino.avi" import scrapertools content_disposition_header = scrapertools.get_header_from_response( url, header_to_get="Content-Disposition") logger.info("content_disposition=" + content_disposition_header) partes = content_disposition_header.split("=") if len(partes) <= 1: raise Exception('filenium', 'no existe') extension = partes[1][-5:-1] nombrefichero = title + extension logger.info( "streamondemand.core.downloadtools getfilefromtitle: nombrefichero=%s" % nombrefichero) nombrefichero = limpia_nombre_caracteres_especiales(nombrefichero) logger.info( "streamondemand.core.downloadtools getfilefromtitle: nombrefichero=%s" % nombrefichero) fullpath = os.path.join(config.get_setting("downloadpath"), nombrefichero) logger.info( "streamondemand.core.downloadtools getfilefromtitle: fullpath=%s" % fullpath) return fullpath
def getotherhost(url): plugintools.log( "GetlinkMu " + url ) # pendiente de crear función getotherlinkmu para servidores no conocidos (hay que extraer url) data = scrapertools.get_header_from_response(url, header_to_get="location") plugintools.log("data= " + data) data = data.split(" ") url = data[0].strip() plugintools.log("url final a devolver= " + url) return url
def getfilefromtitle(url, title, folder=""): logger.info("[downloadtools.py] getfilefromtitle: title=" + title + " url=" + url + " folder=" + folder) # logger.info("[downloadtools.py] downloadtitle: title="+urllib.quote_plus( title )) plataforma = config.get_system_platform() logger.info("[downloadtools.py] getfilefromtitle: plataforma=" + plataforma) # nombrefichero = xbmc.makeLegalFilename(title + url[-4:]) import scrapertools if plataforma == "xbox": nombrefichero = title[:38] + scrapertools.get_filename_from_url(url)[-4:] nombrefichero = limpia_nombre_excepto_1(nombrefichero) else: nombrefichero = title + scrapertools.get_filename_from_url(url)[-4:] logger.info("[downloadtools.py] getfilefromtitle: nombrefichero=%s" % nombrefichero) if "videobb" in url or "videozer" in url or "putlocker" in url: nombrefichero = title + ".flv" if "videobam" in url: nombrefichero = title + "." + url.rsplit(".", 1)[1][0:3] if "dibujos.tv" in url: nombrefichero = title + ".mp4" if "filenium" in url: # Content-Disposition filename="filenium_El.Gato.con.Botas.TSScreener.Latino.avi" import scrapertools content_disposition_header = scrapertools.get_header_from_response(url, header_to_get="Content-Disposition") logger.info("content_disposition=" + content_disposition_header) partes = content_disposition_header.split("=") if len(partes) <= 1: raise Exception("filenium", "no existe") extension = partes[1][-5:-1] nombrefichero = title + extension logger.info("[downloadtools.py] getfilefromtitle: nombrefichero=%s" % nombrefichero) nombrefichero = limpia_nombre_caracteres_especiales(nombrefichero) logger.info("[downloadtools.py] getfilefromtitle: nombrefichero=%s" % nombrefichero) if folder == "": fullpath = os.path.join(config.get_setting("downloadpath"), nombrefichero) else: fullpath = os.path.join(config.get_setting("downloadpath"), folder, nombrefichero) logger.info("[downloadtools.py] getfilefromtitle: fullpath=%s" % fullpath) return fullpath
def getlinkmu(params): plugintools.log( "GetlinkMu " + repr(params) ) # pendiente de crear función getotherlinkmu para servidores no conocidos (hay que extraer url) loginmu() url = params.get("url") # Iniciamos petición de URL que contiene enlaces al capítulo... data = scrapertools.get_header_from_response(url, header_to_get="location") plugintools.log("data= " + data) data = data.split(" ") url = data[0].strip() plugintools.log("url final= " + url) plugintools.log("url= " + url) from resources.tools.resolvers import * if url.find("allmyvideos") >= 0: plugintools.get_params() url = url.replace("http://allmyvideos.net", "http://www.allmyvideos.net").strip() params["url"] = url allmyvideos(params) elif url.find("streamcloud") >= 0: plugintools.get_params() params["url"] = url streamcloud(params) elif url.find("nowvideo.sx") >= 0: plugintools.get_params() url = url.replace("http://nowvideo.sx", "http://www.nowvideo.sx").strip() params["url"] = url nowvideo(params) elif url.find("vidspot") >= 0: plugintools.get_params() url = url.replace("http://vidspot.net", "http://www.vidpot.net").strip() params["url"] = url vidspot(params) elif url.find("playedto") >= 0: plugintools.get_params() params["url"] = url playedto(params)
def getlinkmu(params): plugintools.log( "GetlinkMu " + repr(params) ) # pendiente de crear función getotherlinkmu para servidores no conocidos (hay que extraer url) loginmu() url = params.get("url") show = plugintools.get_setting( "series_id") # Obtenemos modo de vista del usuario para series TV if show is None: show = "tvshows" elif show == "1": show = "seasons" elif show == "2": show = "fanart" elif show == "3": show = "list" elif show == "4": show = "thumbnail" elif show == "5": show = "movies" elif show == "6": show = "tvshows" elif show == "7": show = "episodes" params["page"] = show plugintools.log("show= " + show) plugintools.modo_vista(show) # Iniciamos petición de URL que contiene enlaces al capítulo... data = scrapertools.get_header_from_response(url, header_to_get="location") plugintools.log("data= " + data) data = data.split(" ") url = data[0].strip() plugintools.log("url final= " + url) plugintools.log("url= " + url) from resources.tools.resolvers import * if url.find("allmyvideos") >= 0: plugintools.get_params() url = url.replace("http://allmyvideos.net", "http://www.allmyvideos.net").strip() params["url"] = url allmyvideos(params) elif url.find("streamcloud") >= 0: plugintools.get_params() params["url"] = url streamcloud(params) elif url.find("nowvideo.sx") >= 0: plugintools.get_params() url = url.replace("http://nowvideo.sx", "http://www.nowvideo.sx").strip() params["url"] = url nowvideo(params) elif url.find("vidspot") >= 0: plugintools.get_params() url = url.replace("http://vidspot.net", "http://www.vidpot.net").strip() params["url"] = url vidspot(params) elif url.find("playedto") >= 0: plugintools.get_params() params["url"] = url playedto(params) plugintools.log("show= " + show) plugintools.modo_vista(show)