Skip to content
Snippets Groups Projects
Commit e998cfe4 authored by onbpre's avatar onbpre
Browse files
parent c71920ca
No related branches found
No related tags found
No related merge requests found
......@@ -189,10 +189,34 @@ class WebarchivSession:
return r
def domain_name_search(self, query_string, page_=1, pagesize_=100):
"""
Start a domain name search in the Webarchive.
The current status of running queries can be read via status_open_queries().
:param query_string: String to search for
:param page_: The page number parameter works with the page size parameter to control the offset of the records returned in the results. Default value is 1
:param pagesize_: The page size parameter works with the page number parameter to control the offset of the records returned in the results. It also controls how many results are returned with each request. Default value is 10
:return: result as json
"""
params = {'q': query_string}
if page_:
params['page'] = page_
if pagesize_:
params['pagesize'] = pagesize_
try:
response = self._get(op='/search/domainname', params=params)
return self.waitForResponse(response)
except HTTPError as e:
self._display_http_error(e)
print('Error:'.format(query_string))
if __name__ == '__main__':
# noinspection SpellCheckingInspection
w = WebarchivSession('Zz2tQls7fuaocX2pjrfc2npojqbGwXL2')
w = WebarchivSession('2pm8i0hnmpcTK4Oj4CUeBoZd7vywrm4c')
# response = w.wayback_search("http://www.onb.ac.at")
#response = w.wayback_search("http://frauenhetz.jetzt")
response = w.fulltext_search("Nationalbibliothek Prunksaal Schwarzenegger")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment