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