From a521cfe8741389c55f5a24503833375a06181f65 Mon Sep 17 00:00:00 2001 From: Akash Mahanty Date: Fri, 16 Oct 2020 20:40:30 +0530 Subject: [PATCH] Update README.md --- README.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/README.md b/README.md index c21582b..36ed8a0 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,26 @@ https://web.archive.org/web/20200504141153/https://github.com/akamhy/waybackpy Try this out in your browser @ +#### Retrieving the archive for an URL using archive_url + +```python +import waybackpy + +archive_url = waybackpy.Url( + + "https://www.google.com/", + "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:40.0) Gecko/20100101 Firefox/40.0" +).archive_url + +print(archive_url) +``` + +```bash +http://web.archive.org/web/20201011184551/http://google.com/ +``` + +Try this out in your browser @ + #### Retrieving the oldest archive for an URL using oldest() ```python @@ -134,6 +154,26 @@ https://web.archive.org/web/20200714013225/https://www.facebook.com/ Try this out in your browser @ +#### Retrieving the JSON reponse for the avaliblity API request + +```python +import waybackpy + +json_dict = waybackpy.Url( + + "https://www.google.com/", + "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:40.0) Gecko/20100101 Firefox/40.0" +).JSON + +print(json_dict) +``` + +```bash +{"": ""} +``` + +Try this out in your browser @ + #### Retrieving archive close to a specified year, month, day, hour, and minute using near() ```python