

def get_sources(self, url, hosthdDict, hostDict, locDict):
    try:
        sources = []
        if (url == None):
            return sources
        base = urlparse.urljoin(self.base_link, url)
        for i in range(5):
            result = client.source(base, close=False)
            if (not (result == None)):
                break
        result = client.parseDOM(result, 'script', attrs={
            'type': 'text/javascript',
        })
        result = [i for i in result if ('parametros;' in i)][0]
        result = ('function' + result.split('function', 1)[(- 1)])
        result = (result.rsplit('parametros;', 1)[0] + 'parametros;')
        from resources.lib.libraries import js2py
        result = js2py.evaljs.eval_js(result)
        result = str(result)
        links = re.compile('pic=([^&]+)').findall(result)
        links = [x for (y, x) in enumerate(links) if (x not in links[:y])]
        for i in links:
            try:
                url = urlparse.urljoin(self.base_link, self.pk_link)
                post = {
                    'url': i,
                    'fv': '16',
                    'sou': 'pic',
                }
                result = client.source(url, post=post, referer=base)
                result = json.loads(url)
                try:
                    sources.append({
                        'source': 'GVideo',
                        'quality': '1080p',
                        'provider': 'YIFY',
                        'url': [i['url'] for i in result if ((i['width'] == 1920) and ('google' in i['url']))][0],
                    })
                except:
                    pass
                try:
                    sources.append({
                        'source': 'GVideo',
                        'quality': 'HD',
                        'provider': 'YIFY',
                        'url': [i['url'] for i in result if ((i['width'] == 1280) and ('google' in i['url']))][0],
                    })
                except:
                    pass
                try:
                    sources.append({
                        'source': 'YIFY',
                        'quality': '1080p',
                        'provider': 'YIFY',
                        'url': [i['url'] for i in result if ((i['width'] == 1920) and (not ('google' in i['url'])))][0],
                    })
                except:
                    pass
                try:
                    sources.append({
                        'source': 'YIFY',
                        'quality': 'HD',
                        'provider': 'YIFY',
                        'url': [i['url'] for i in result if ((i['width'] == 1280) and (not ('google' in i['url'])))][0],
                    })
                except:
                    pass
            except:
                pass
        return sources
    except:
        return sources

dataset/ETHPy150Open mrknow/filmkodi/plugin.video.specto/resources/lib/sources/yify_mv_null.py source.get_sources/VarMisuse@311/370 `result`->`url`