Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
webarchive-api
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
labs-team
webarchive-api
Merge requests
!9
Save Page sample
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Save Page sample
aponb/webarchive-api:savepage_sample
into
master
Overview
0
Commits
2
Pipelines
0
Changes
2
Merged
aponb
requested to merge
aponb/webarchive-api:savepage_sample
into
master
5 years ago
Overview
0
Commits
2
Pipelines
0
Changes
2
Expand
Save Page Sample
0
0
Merge request reports
Viewing commit
70722f7e
Prev
Next
Show latest version
2 files
+
68
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
70722f7e
Save Page Sample
· 70722f7e
Andreas
authored
5 years ago
sample8.ipynb
0 → 100644
+
50
−
0
Options
%% 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
.
savePage
(
"
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}
%% Cell type:code id: tags:
```
python
```
Loading