Exemplo n.º 1
0
def retrieveVideoInfo(video_id):
    video_info = Video()
    video_info.set_video_host(getVideoHost())
    video_info.set_id(video_id)
    try:
        video_info_link = 'http://www.videobb.com/player_control/settings.php?v=' + video_id + '&fv=v1.2.72'
        jsonObj = json.load(urllib.urlopen(video_info_link))
                
        key1 = jsonObj["settings"]["config"]["rkts"]
        key2 = jsonObj["settings"]["login_status"]["pepper"]
        key3 = jsonObj["settings"]["banner"]["lightbox2"]["time"]
        
        values = binascii.unhexlify(decrypt(jsonObj["settings"]["login_status"]["spen"], jsonObj["settings"]["login_status"]["salt"], 950569)).split(';')
        spn = http.parse_url_params(values[0])
        outk = http.parse_url_params(values[1])
        ikey = getikey(int(outk["ik"]))
        
        urlKey = ''
        for spnkey in spn:
            spnval = spn[spnkey]
            if spnval == '1':
                cypher = jsonObj["settings"]["video_details"]["sece2"]
                urlKey = urlKey + spnkey + '=' + decrypt(cypher, key1, ikey, ln=256) + '&'
            if spnval == '2':
                cypher = jsonObj["settings"]["banner"]["g_ads"]["url"]
                urlKey = urlKey + spnkey + '=' + decrypt(cypher, key1, ikey) + '&'
            if spnval == '3':
                cypher = jsonObj["settings"]["banner"]["g_ads"]["type"]
                urlKey = urlKey + spnkey + '=' + decrypt(cypher, key1, ikey, 26, 25431, 56989, 93, 32589, 784152) + '&'
            if spnval == '4':
                cypher = jsonObj["settings"]["banner"]["g_ads"]["time"]
                urlKey = urlKey + spnkey + '=' + decrypt(cypher, key1, ikey, 82, 84669, 48779, 32, 65598, 115498) + '&'
            if spnval == '5':
                cypher = jsonObj["settings"]["login_status"]["euno"]
                urlKey = urlKey + spnkey + '=' + decrypt(cypher, key2, ikey, 10, 12254, 95369, 39, 21544, 545555) + '&'
            if spnval == '6':
                cypher = jsonObj["settings"]["login_status"]["sugar"]
                urlKey = urlKey + spnkey + '=' + decrypt(cypher, key3, ikey, 22, 66595, 17447, 52, 66852, 400595) + '&'
        
        urlKey = urlKey + "start=0"
        
        video_link = ""
        for videoStrm in jsonObj["settings"]["res"]:
            if videoStrm["d"]:
                video_link = str(base64.b64decode(videoStrm["u"]))
        if video_link == "":
            video_info.set_video_stopped(False)
            raise Exception("VIDEO_STOPPED")
        video_link = video_link + '&' + urlKey
        
        video_info.set_name(jsonObj["settings"]["video_details"]["video"]["title"])
        video_info.set_thumb_image(jsonObj["settings"]["config"]["thumbnail"])
        video_info.set_stopped(False)
        video_info.add_stream_link(STREAM_QUAL_SD, video_link)
    except:
        video_info.set_stopped(True)
    return video_info
Exemplo n.º 2
0
def retrieveVideoInfo(video_id):
    video_info = Video()
    video_info.set_video_host(getVideoHost())
    video_info.set_id(video_id)
    try:
        video_info_link = 'http://www.videozer.com/player_control/settings.php?v=' + video_id + '&fv=v1.1.45'
        jsonObj = json.load(urllib.urlopen(video_info_link))
                
        key1 = jsonObj["cfg"]["environment"]["rkts"]
        key2 = jsonObj["cfg"]["login"]["pepper"]
        key3 = jsonObj["cfg"]["ads"]["lightbox2"]["time"]
        
        values = binascii.unhexlify(decrypt(jsonObj["cfg"]["login"]["spen"], jsonObj["cfg"]["login"]["salt"], 950569)).split(';')
        spn = http.parse_url_params(values[0])
        outk = http.parse_url_params(values[1])
        ikey = getikey(int(outk["ik"]))
        
        urlKey = ''
        for spnkey in spn:
            spnval = spn[spnkey]
            if spnval == '1':
                cypher = jsonObj["cfg"]["info"]["sece2"]
                urlKey = urlKey + spnkey + '=' + decrypt(cypher, key1, ikey, ln=256) + '&'
            if spnval == '2':
                cypher = jsonObj["cfg"]["ads"]["g_ads"]["url"]
                urlKey = urlKey + spnkey + '=' + decrypt(cypher, key1, ikey) + '&'
            if spnval == '3':
                cypher = jsonObj["cfg"]["ads"]["g_ads"]["type"]
                urlKey = urlKey + spnkey + '=' + decrypt(cypher, key1, ikey, 26, 25431, 56989, 93, 32589, 784152) + '&'
            if spnval == '4':
                cypher = jsonObj["cfg"]["ads"]["g_ads"]["time"]
                urlKey = urlKey + spnkey + '=' + decrypt(cypher, key1, ikey, 82, 84669, 48779, 32, 65598, 115498) + '&'
            if spnval == '5':
                cypher = jsonObj["cfg"]["login"]["euno"]
                urlKey = urlKey + spnkey + '=' + decrypt(cypher, key2, ikey, 10, 12254, 95369, 39, 21544, 545555) + '&'
            if spnval == '6':
                cypher = jsonObj["cfg"]["login"]["sugar"]
                urlKey = urlKey + spnkey + '=' + decrypt(cypher, key3, ikey, 22, 66595, 17447, 52, 66852, 400595) + '&'
        
        urlKey = urlKey + "start=0"
        
        video_link = ""
        for videoStrm in jsonObj["cfg"]["quality"]:
            if videoStrm["d"]:
                video_link = str(base64.b64decode(videoStrm["u"]))
        if video_link == "":
            video_info.set_video_stopped(False)
            raise Exception("VIDEO_STOPPED")
        video_link = video_link + '&' + urlKey
        
        video_info.set_name(jsonObj["cfg"]["info"]["video"]["title"])
        video_info.set_thumb_image(jsonObj["cfg"]["environment"]["thumbnail"])
        video_info.set_stopped(False)
        video_info.add_stream_link(STREAM_QUAL_SD, video_link)
    except:
        video_info.set_video_stopped(True)
    return video_info
Exemplo n.º 3
0
def retrieveVideoInfo(video_id):
    
    video_info = Video()
    video_info.set_video_host(getVideoHost())
    video_info.set_id(video_id)
    try:
        video_info_link = 'http://www.zalaa.com/' + str(video_id)
        html = http.HttpClient().get_html_content(url=video_info_link)
        link = ''.join(html.splitlines()).replace('\'', '"')
        video_link = re.compile('s1.addVariable\("file","(.+?)"\);').findall(link)[0]
        video_info.add_stream_link(STREAM_QUAL_SD, video_link)
        video_info.set_stopped(False)
        
    except: 
        video_info.set_video_stopped(True)
    return video_info
Exemplo n.º 4
0
def retrieveVideoInfo(video_id):

    video_info = Video()
    video_info.set_video_host(getVideoHost())
    video_info.set_id(video_id)
    try:
        video_info_link = 'http://www.zalaa.com/' + str(video_id)
        html = http.HttpClient().get_html_content(url=video_info_link)
        link = ''.join(html.splitlines()).replace('\'', '"')
        video_link = re.compile('s1.addVariable\("file","(.+?)"\);').findall(
            link)[0]
        video_info.add_stream_link(STREAM_QUAL_SD, video_link)
        video_info.set_stopped(False)

    except:
        video_info.set_video_stopped(True)
    return video_info