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)