Update README.md
This commit is contained in:
10
README.md
10
README.md
@@ -13,7 +13,7 @@
|
|||||||
[](https://github.com/akamhy/waybackpy/graphs/commit-activity)
|
[](https://github.com/akamhy/waybackpy/graphs/commit-activity)
|
||||||
[](https://codecov.io/gh/akamhy/waybackpy)
|
[](https://codecov.io/gh/akamhy/waybackpy)
|
||||||

|

|
||||||
[]
|

|
||||||
|
|
||||||
|
|
||||||

|

|
||||||
@@ -54,16 +54,12 @@ pip install waybackpy
|
|||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
#### Capturing aka Saving an url Using save()
|
#### Capturing aka Saving an url Using save()
|
||||||
|
|
||||||
```diff
|
|
||||||
+ waybackpy.save(url, UA=user_agent)
|
|
||||||
```
|
|
||||||
> url is mandatory. UA is not, but highly recommended.
|
|
||||||
```python
|
```python
|
||||||
import waybackpy
|
import waybackpy
|
||||||
# Capturing a new archive on Wayback machine.
|
# Capturing a new archive on Wayback machine.
|
||||||
# Default user-agent (UA) is "waybackpy python package", if not specified in the call.
|
# Default user-agent (UA) is "waybackpy python package", if not specified in the call.
|
||||||
archived_url = waybackpy.save("https://github.com/akamhy/waybackpy", UA = "Any-User-Agent")
|
target_url = waybackpy.Url("https://github.com/akamhy/waybackpy", user_agnet="My-cool-user-agent")
|
||||||
|
archived_url = target_url.save()
|
||||||
print(archived_url)
|
print(archived_url)
|
||||||
```
|
```
|
||||||
This should print something similar to the following archived URL:
|
This should print something similar to the following archived URL:
|
||||||
|
Reference in New Issue
Block a user