X-Git-Url: http://git.scottworley.com/paperdoorknob/blobdiff_plain/e138a9b49da14f16c1de2c02dd928fd5d16aed52..b34a368f048581720738d2ea0b99504a98b3c64d:/paperdoorknob.py diff --git a/paperdoorknob.py b/paperdoorknob.py index b4f5e52..c1117c2 100644 --- a/paperdoorknob.py +++ b/paperdoorknob.py @@ -7,6 +7,7 @@ from argparse import ArgumentParser import requests +import requests_cache def command_line_parser() -> ArgumentParser: @@ -26,7 +27,7 @@ def fetch(url: str, session: requests.Session, timeout: int) -> None: def main() -> None: args = command_line_parser().parse_args() - with requests.session() as session: + with requests_cache.CachedSession() as session: fetch(args.url, session, args.timeout)