Update README.md

This commit is contained in:
Akash
2020-07-18 08:24:37 +05:30
committed by GitHub
parent e1bfce74b8
commit cc75a7e177

View File

@@ -64,7 +64,7 @@ print(archived_url)
``` ```
This should print an URL similar to the following archived URL: This should print an URL similar to the following archived URL:
<https://web.archive.org/web/20200504141153/https://github.com/akamhy/waybackpy> > <https://web.archive.org/web/20200504141153/https://github.com/akamhy/waybackpy>
#### Receiving the oldest archive for an URL Using oldest() #### Receiving the oldest archive for an URL Using oldest()
@@ -77,22 +77,18 @@ This should print an URL similar to the following archived URL:
```python ```python
import waybackpy import waybackpy
# retrieving the oldest archive on Wayback machine. # retrieving the oldest archive on Wayback machine.
# Default user-agent (UA) is "waybackpy python package", if not specified in the call. # Default user_agent is "waybackpy python package".
oldest_archive = waybackpy.oldest("https://www.google.com/", UA = "Any-User-Agent") oldest_archive = waybackpy.oldest("https://www.google.com/", UA = "Any-User-Agent")
print(oldest_archive) print(oldest_archive)
``` ```
This returns the oldest available archive for <https://google.com>. This returns the oldest available archive for <https://google.com>.
<http://web.archive.org/web/19981111184551/http://google.com:80/> > <http://web.archive.org/web/19981111184551/http://google.com:80/>
#### Receiving the newest archive for an URL using newest() #### Receiving the newest archive for an URL using newest()
```diff
+ waybackpy.newest(url, UA=user_agent)
```
> url is mandatory. UA is not, but highly recommended. > url is mandatory. UA is not, but highly recommended.
```python ```python
import waybackpy import waybackpy
# retrieving the newest archive on Wayback machine. # retrieving the newest archive on Wayback machine.