Skip to content
Snippets Groups Projects
Commit 7db1c130 authored by onbpre's avatar onbpre
Browse files

sample fix

parent 0133bb31
No related branches found
No related tags found
1 merge request!12new Methods
%% Cell type:markdown id: tags:
%% Cell type:code id: tags:
``` python
import requests
import json
```
%% Cell type:markdown id: tags:
Create a WebarchivSession Object with convenience methods for easy access with your API-Key
%% Cell type:code id: tags:
``` python
from webarchiv import WebarchivSession
apikey = '2pm8i0hnmpcTK4Oj4CUeBoZd7vywrm4c'
w = WebarchivSession(apikey)
```
%% Cell type:raw id: tags:
request archiving a Webpage
%% Cell type:code id: tags:
``` python
response = w.save_page("http://www.onb.ac.at")
if response.status_code == 201:
print(response.json())
else:
print("Error ", response.status_code)
```
%% Output
{'nomination_id': 247, 'seed': 'http://www.onb.ac.at', 'nominationtype': 5}
{'nomination_id': 374, 'seed': 'http://www.onb.ac.at', 'nominationtype': 5}
%% Cell type:code id: tags:
``` python
```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment