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
Commits
7db1c130
Commit
7db1c130
authored
6 years ago
by
onbpre
Browse files
Options
Downloads
Patches
Plain Diff
sample fix
parent
0133bb31
No related branches found
No related tags found
1 merge request
!12
new Methods
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
sample8.ipynb
+3
-3
3 additions, 3 deletions
sample8.ipynb
with
3 additions
and
3 deletions
sample8.ipynb
+
3
−
3
View file @
7db1c130
...
...
@@ -43,14 +43,14 @@
},
{
"cell_type": "code",
"execution_count":
3
,
"execution_count":
4
,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'nomination_id':
247
, 'seed': 'http://www.onb.ac.at', 'nominationtype': 5}\n"
"{'nomination_id':
374
, 'seed': 'http://www.onb.ac.at', 'nominationtype': 5}\n"
]
}
],
...
...
@@ -91,7 +91,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.
5
"
"version": "3.6.
6
"
}
},
"nbformat": 4,
...
...
%% 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
```
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment