コード例 #1
0
ファイル: default.py プロジェクト: lockers90/Isengard
def GrabMailRu(url):
    print 'RESOLVING VIDEO.MAIL.RU VIDEO API LINK'

    import json
    items = []
    quality = "???"
    data = getData(url)
    cookie = net.get_cookies()
    for x in cookie:

        for y in cookie[x]:

            for z in cookie[x][y]:

                l = (cookie[x][y][z])
    name = []
    url = []
    r = '"key":"(.+?)","url":"(.+?)"'
    match = re.compile(r, re.DOTALL).findall(data)
    for quality, stream in match:
        name.append(quality.title())

        test = str(l)
        test = test.replace('<Cookie ', '')
        test = test.replace(' for .my.mail.ru/>', '')
        url.append(stream + '|Cookie=' + test)

    return url[xbmcgui.Dialog().select('Please Select Resolution', name)]
コード例 #2
0
ファイル: default.py プロジェクト: c0ns0le/YCBuilds
def GrabMailRu(url):
    print 'RESOLVING VIDEO.MAIL.RU VIDEO API LINK'
      
    import json
    items = []
    quality = "???"
    data = getData(url)
    cookie = net.get_cookies()
    for x in cookie:

         for y in cookie[x]:

              for z in cookie[x][y]:
                   
                   l= (cookie[x][y][z])
    name=[]
    url=[]
    r = '"key":"(.+?)","url":"(.+?)"'
    match = re.compile(r,re.DOTALL).findall(data)
    for quality,stream in match:
        name.append(quality.title())
        

  
        test = str(l)
        test = test.replace('<Cookie ','')
        test = test.replace(' for .my.mail.ru/>','')
        url.append(stream +'|Cookie='+test)

    return url[xbmcgui.Dialog().select('Please Select Resolution', name)]