Commit d1b3f7a2 authored by onbpre's avatar onbpre

get snapshots from captures

parent ccc57de7
This diff is collapsed.
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment