Convert a query from the Trove web interface into a set of parameters that can be used with the Trove API.
- Construct a search in the Trove 'Newspapers and Gazettes' category.
- Copy the search url.
- Feed the url to the
parse_query
function
The second parameter to parse_query
is the Trove API version number. The default is 2
for backwards compatibility.
from trove_query_parser.parser import parse_query
parse_query('https://trove.nla.gov.au/search/category/newspapers?keyword=wragge&l-artType=newspapers&l-state=Queensland&l-category=Article&l-illustrationType=Cartoon', 3)
See the documentation for a more detailed example.
Created by Tim Sherratt (@wragge) for the GLAM Workbench.