Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
webarchive-api
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
aponb
webarchive-api
Commits
d1b3f7a2
Commit
d1b3f7a2
authored
Mar 20, 2019
by
onbpre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get snapshots from captures
parent
ccc57de7
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
206 additions
and
1 deletion
+206
-1
sample7.ipynb
sample7.ipynb
+194
-0
webarchiv.py
webarchiv.py
+12
-1
No files found.
sample7.ipynb
0 → 100644
View file @
d1b3f7a2
This diff is collapsed.
Click to expand it.
webarchiv.py
View file @
d1b3f7a2
...
...
@@ -18,6 +18,15 @@ class WebarchivSession:
"""
return
'0.1.0'
@
property
def
api_path
(
self
):
"""
Protocol, domain and path prefix for the Webarchive API,
with a single positional format string placeholder
for the REST operation and parameters.
"""
return
'https://webarchiv.onb.ac.at/api/'
@
property
def
base_url
(
self
):
"""
...
...
@@ -25,7 +34,7 @@ class WebarchivSession:
with a single positional format string placeholder
for the REST operation and parameters.
"""
return
'https://webarchiv.onb.ac.at/api
/{}'
return
self
.
api_path
+
'
/{}'
@
property
def
_error_template
(
self
):
...
...
@@ -239,6 +248,8 @@ class WebarchivSession:
self
.
_display_http_error
(
e
)
print
(
'Error:'
.
format
(
query_string
))
def
getSnapshotUrl
(
self
,
id
):
return
self
.
api_path
+
'snapshot/'
+
id
+
"?t="
+
self
.
token
+
"&apikey="
+
self
.
api_key
;
if
__name__
==
'__main__'
:
# noinspection SpellCheckingInspection
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment