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
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.getvideo(code) elif server == "directo": mediaurl = code elif server == "4shared": import fourshared mediaurl = fourshared.geturl(code) elif server == "facebook": mediaurl = 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
def findurl(code,server): mediaurl = "ERROR" server = server.lower() #Para hacer el procedimiento case insensitive if server == "megavideo": import megavideo mediaurl = megavideo.Megavideo(code) if server == "megaupload": import megaupload mediaurl = megaupload.getvideo(code) if server == "vreel": import vreel mediaurl = vreel.Vreel(code) if server == "stagevu": import stagevu mediaurl = stagevu.Stagevu(code) if server == "tu.tv": import tutv mediaurl = tutv.Tutv(code) if server == "movshare": import movshare mediaurl = movshare.getvideo(code) if server == "veoh": import veoh mediaurl = veoh.getvideo(code) if server == "directo": mediaurl = code if server == "metadivx": import metadivx mediaurl = metadivx.geturl(code) if server == "divxden": import divxden mediaurl = divxden.geturl(code) if server == "divxlink": import divxlink mediaurl = divxlink.geturl(code) if server == "videoweed": import videoweed mediaurl = videoweed.geturl(code) if server == "youtube": import youtube mediaurl = youtube.geturl(code) if server == "zshare": import zshare mediaurl = zshare.geturl(code) if server == "4shared": import fourshared mediaurl = fourshared.geturl(code) if server == "cinshare": import cinshare mediaurl = cinshare.geturl(code) if server == "facebook": mediaurl = code if server == "xml": import xmltoplaylist mediaurl = xmltoplaylist.geturl(code) if server == "vimeo": import vimeo mediaurl = vimeo.geturl(code) return mediaurl