webcache/yandex.py
def cache(url):
        """
        Search for a cache url in yandex and if found get its content
        """
        # FIXME: miss obvious pages, like www.domain.com instead of domain.com
        v, res = Yandex.search(url)
        if v:
            for i in res:
                if i['url'] == url:
                    if 'cache' in i:
                        c = Yandex.download_cache(i['cache'])
                        c['found'] = True
                        return c
            return {'success': True, 'found': False}
        else:
            return {'success': False}

        Search for a cache url in yandex and if found get its content
        
Search for a cache url in yandex and if found get its content
Search for a cache url in yandex and if found get its content
def cache(url):
        v, res = Yandex.search(url)
        if v:
            for i in res:
                if i['url'] == url:
                    if 'cache' in i:
                        c = Yandex.download_cache(i['cache'])
                        c['found'] = True
                        return c
            return {'success': True, 'found': False}
        else:
            return {'success': False}
def cache ( url ) : v , res = Yandex . search ( url ) if v : for i in res : if i [ 'url' ] == url : if 'cache' in i : c = Yandex . download_cache ( i [ 'cache' ] ) c [ 'found' ] = True return c return { 'success' : True , 'found' : False } else : return { 'success' : False }
Search for a cache url in yandex and if found get its content
Search for a cache url in yandex and if found get its content
"""
        Search for a cache url in yandex and if found get its content
        """ # FIXME: miss obvious pages, like www.domain.com instead of domain.com
url