(url)
Download cache from a cache url
Download cache from a cache url
Download cache from a cache url
def download_cache(url):
        """
        Download cache from a cache url
        """
        r = requests.get(url)
        if r.status_code == 200:
            mark1 = r.text.find("It is a snapshot of the page as it appeared on ")
            timestamptext = r.text[mark1+47:mark1+47+24]
            timestamp = parse(timestamptext)
            return {
                    "success": True,
                    "date": timestamp,
                    "data": html.unescape(r.text[r.text.find("<pre>")+5:r.text.find("</pre>")]),
                    'cacheurl': r.url

            }
        else:
            if r.status_code != 404:
                print("Weird, it should return 404...")
            return {"success": False}
def download_cache ( url ) : r = requests . get ( url ) if r . status_code == 200 : mark1 = r . text . find ( "It is a snapshot of the page as it appeared on " ) timestamptext = r . text [ mark1 + 47 : mark1 + 47 + 24 ] timestamp = parse ( timestamptext ) return { "success" : True , "date" : timestamp , "data" : html . unescape ( r . text [ r . text . find ( "<pre>" ) + 5 : r . text . find ( "</pre>" ) ] ) , 'cacheurl' : r . url } else : if r . status_code != 404 : print ( "Weird, it should return 404..." ) return { "success" : False }