def findurl(code,server):
    mediaurl = "ERROR"
    server = server.lower() #Para hacer el procedimiento case insensitive

    if server == "megavideo":
        import megavideo
        mediaurl = megavideo.Megavideo(code)

    elif server == "megaupload":
        import megaupload
        mediaurl = megaupload.gethighurl(code)
        
    elif server == "directo":
        mediaurl = code

    elif server == "4shared":
        import fourshared
        mediaurl = fourshared.geturl(code)
        
    elif server == "xml":
        import xmltoplaylist
        mediaurl = xmltoplaylist.geturl(code)

    else:
        try:
            exec "import "+server+" as serverconnector"
            mediaurl = serverconnector.geturl(code)
        except:
            mediaurl = "ERROR"
            import sys
            for line in sys.exc_info():
                logger.error( "%s" % line )
        
    return mediaurl
예제 #2
0
def getmegauploadhigh(code):
    return megaupload.gethighurl(code)
def getmegauploadhigh(code):
	return megaupload.gethighurl(code)
def getmegauploadhigh(code):
    import megaupload
    return megaupload.gethighurl(code)
예제 #5
0
def getmegauploadhigh(code):
    import megaupload
    return megaupload.gethighurl(code)
def getmegauploadhigh(code, password=None):
    import megaupload
    if password is not None:
	    return megaupload.gethighurl(code,password)
    else:
        return megaupload.gethighurl(code)