From e39467227c05f6f7f2fb67d4eba17826d56a8be5 Mon Sep 17 00:00:00 2001 From: Akash <64683866+akamhy@users.noreply.github.com> Date: Sat, 18 Jul 2020 16:51:47 +0530 Subject: [PATCH] Update index.rst --- index.rst | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/index.rst b/index.rst index fa21b99..1a71454 100644 --- a/index.rst +++ b/index.rst @@ -84,3 +84,32 @@ Table of contents .. _Tests: #tests .. _Dependency: #dependency .. _License: #license + +Installation +------------ + +Using `pip`_: + +.. code:: bash + + pip install waybackpy + +Usage +----- + +Capturing aka Saving an url Using save() +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. code:: python + + import waybackpy + # Capturing a new archive on Wayback machine. + target_url = waybackpy.Url("https://github.com/akamhy/waybackpy", user_agnet="My-cool-user-agent") + archived_url = target_url.save() + print(archived_url) + +This should print an URL similar to the following archived URL: + + https://web.archive.org/web/20200504141153/https://github.com/akamhy/waybackpy + +.. _pip: https://en.wikipedia.org/wiki/Pip_(package_manager)