Update README.md

This commit is contained in:
Akash Mahanty
2020-10-17 10:27:14 +05:30
committed by GitHub
parent 965e70bd27
commit d11b6dd14f

View File

@@ -177,53 +177,47 @@ print(json_dict)
from waybackpy import Url from waybackpy import Url
user_agent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0" user_agent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0"
github_url = "https://github.com/" url = "https://github.com/"
waybackpy_url_obj = Url(url, user_agent)
github_wayback_obj = Url(github_url, user_agent)
# Do not pad (don't use zeros in the month, year, day, minute, and hour arguments). e.g. For January, set month = 1 and not month = 01. # Do not pad (don't use zeros in the month, year, day, minute, and hour arguments). e.g. For January, set month = 1 and not month = 01.
``` ```
```python ```python
github_archive_near_2010 = github_wayback_obj.near(year=2010) github_archive_near_2010 = waybackpy_url_obj.near(year=2010)
print(github_archive_near_2010) print(github_archive_near_2010)
``` ```
```bash ```bash
https://web.archive.org/web/20100719134402/http://github.com/ https://web.archive.org/web/20101018053604/http://github.com:80/
``` ```
```python ```python
github_archive_near_2011_may = github_wayback_obj.near(year=2011, month=5) github_archive_near_2011_may = waybackpy_url_obj.near(year=2011, month=5)
print(github_archive_near_2011_may) print(github_archive_near_2011_may)
``` ```
```bash ```bash
https://web.archive.org/web/20110519185447/https://github.com/ https://web.archive.org/web/20110518233639/https://github.com/
``` ```
```python ```python
github_archive_near_2015_january_26 = github_wayback_obj.near( github_archive_near_2015_january_26 = waybackpy_url_obj.near(year=2015, month=1, day=26)
year=2015, month=1, day=26
)
print(github_archive_near_2015_january_26) print(github_archive_near_2015_january_26)
``` ```
```bash ```bash
https://web.archive.org/web/20150127031159/https://github.com https://web.archive.org/web/20150125102636/https://github.com/
``` ```
```python ```python
github_archive_near_2018_4_july_9_2_am = github_wayback_obj.near( github_archive_near_2018_4_july_9_2_am = waybackpy_url_obj.near(year=2018, month=7, day=4, hour=9, minute=2)
year=2018, month=7, day=4, hour = 9, minute = 2
)
print(github_archive_near_2018_4_july_9_2_am) print(github_archive_near_2018_4_july_9_2_am)
``` ```
```bash ```bash
https://web.archive.org/web/20180704090245/https://github.com/ https://web.archive.org/web/20180704090245/https://github.com/
``` ```
<sub>The library doesn't supports seconds yet. You are encourged to create a PR ;)</sub> <sub>The library doesn't supports seconds yet. You are encourged to create a PR ;)</sub>