diff --git a/memorious/logic/http.py b/memorious/logic/http.py index 511b4ca..abbc210 100644 --- a/memorious/logic/http.py +++ b/memorious/logic/http.py @@ -253,6 +253,9 @@ def last_modified(self): if last_modified_header is not None: # Tue, 15 Nov 1994 12:45:26 GMT last_modified = parse_date(last_modified_header) + if last_modified is None: + return None + if last_modified < now + timedelta(seconds=30): return last_modified.strftime("%Y-%m-%dT%H:%M:%S%z") return None diff --git a/setup.py b/setup.py index 51b71f8..8d577f4 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name="memorious", - version="2.5.0", + version="2.5.1", description="A minimalistic, recursive web crawling library for Python.", long_description="", classifiers=[