From a4826e1954d7572f945616a8a5becf6d038616ee Mon Sep 17 00:00:00 2001 From: Akash <64683866+akamhy@users.noreply.github.com> Date: Sat, 18 Jul 2020 08:30:57 +0530 Subject: [PATCH] Update README.md --- README.md | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 3af0f68..b6b6748 100644 --- a/README.md +++ b/README.md @@ -138,29 +138,24 @@ print(webpage) > This should print the source code for . #### Count total archives for an URL using total_archives() - -```diff -+ waybackpy.total_archives(url, UA=user_agent) -``` -> url is mandatory. UA is not, but highly recommended. - ```python -from waybackpy import total_archives +from waybackpy import Url # retriving the webpage from any url including the archived urls. Don't need to import other libraies :) # Default user-agent (UA) is "waybackpy python package", if not specified in the call. # supported argumnets are url and UA -count = total_archives("https://en.wikipedia.org/wiki/Python (programming language)", UA="User-Agent") +count = Url("https://en.wikipedia.org/wiki/Python (programming language)", "User-Agent").total_archives() print(count) ``` > This should print an integer (int), which is the number of total archives on archive.org + ## Tests * [Here](https://github.com/akamhy/waybackpy/tree/master/tests) + ## Dependency * None, just python standard libraries (json, urllib and datetime). Both python 2 and 3 are supported :) ## License - [MIT License](https://github.com/akamhy/waybackpy/blob/master/LICENSE)