diff --git a/conjurer_librarian/conjurer_librarian.py b/conjurer_librarian/conjurer_librarian.py index b0056f2..dd8cd8d 100644 --- a/conjurer_librarian/conjurer_librarian.py +++ b/conjurer_librarian/conjurer_librarian.py @@ -95,9 +95,10 @@ class Librarian(object): if item["UUID"]: print (item["UUID"]) uuid_found = True + self.last_search = item if uuid_found: return self.last_search - self.search_crossref(query=query, uuid=uuid) + #self.search_crossref(query=query, uuid=uuid) #example not exists #sample_non_existing_page_url = "https://sci-hub.se/10.4324/9781003006237" @@ -137,9 +138,8 @@ def query_database(): app.logger.info(record) app.logger.info(record["query"]) app.logger.info(record["UUID"]) - cl = Librarian() - + cl.answer_query(record["query"], record["UUID"]) answer_data = cl.last_search return_data = ( jsonify(isError=False, message="Success", statusCode=200, data=answer_data),