1
0
Fork 0

Merge branch 'rrgeorge/csp' of github.com:rrgeorge/bookwyrm into rrgeorge/csp

This commit is contained in:
Robert George 2023-02-03 11:53:52 -08:00
commit 297738dbb1
3 changed files with 5 additions and 2 deletions

View file

@ -1,5 +1,6 @@
""" functionality outline for a book data connector """
from abc import ABC, abstractmethod
from urllib.parse import quote_plus
import imghdr
import logging
import re
@ -48,7 +49,7 @@ class AbstractMinimalConnector(ABC):
return f"{self.isbn_search_url}{normalized_query}"
# NOTE: previously, we tried searching isbn and if that produces no results,
# searched as free text. This, instead, only searches isbn if it's isbn-y
return f"{self.search_url}{query}"
return f"{self.search_url}{quote_plus(query)}"
def process_search_response(self, query, data, min_confidence):
"""Format the search results based on the formt of the query"""