def resolve(url):
    try:
        id = re.compile('#(\d*)').findall(url)[0]

        result = client.request(url)
        result = re.search('feedPreload:\s*(.*}]}})},', result, re.DOTALL).group(1)
        result = json.loads(result)['feed']['entry']

        if len(result) > 1: result = [i for i in result if str(id) in i['streamIds'][0]][0]
        elif len(result) == 1: result = result[0]

        result = result['media']['content']
        result = [i['url'] for i in result if 'video' in i['type']]
        result = sum([tag(i) for i in result], [])

        url = []
        try: url += [[i for i in result if i['quality'] == '1080p'][0]]
        except: pass
        try: url += [[i for i in result if i['quality'] == 'HD'][0]]
        except: pass
        try: url += [[i for i in result if i['quality'] == 'SD'][0]]
        except: pass

        if url == []: return
        return url
    except:
        return
dataset/ETHPy150Open mrknow/filmkodi/plugin.video.specto/resources/lib/resolvers/googlepicasa.py/resolve/original