Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Caching python web requests for offline use

Is there a way to "cache" the requests I make with the python "requests" module in a way that even if I go offline the module still returns the webpage as if I was online? How can I achieve something like this? Currently I only found caching libraries that just cache the webpage but you still have to be online...

like image 922
Con7e Avatar asked Jan 30 '26 09:01

Con7e


1 Answers

I think you can use request_cache module available.

Please check http://requests-cache.readthedocs.org/en/latest/user_guide.html

Once you cache using request_cache data is available even if you are disconnected.

like image 77
Arundas R Avatar answered Feb 01 '26 23:02

Arundas R