mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-01-11 09:45:27 +00:00
Merge branch 'main' into rrgeorge/csp
This commit is contained in:
commit
739c384715
3 changed files with 5 additions and 2 deletions
2
.github/workflows/black.yml
vendored
2
.github/workflows/black.yml
vendored
|
@ -13,3 +13,5 @@ jobs:
|
|||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
- uses: psf/black@22.12.0
|
||||
with:
|
||||
version: 22.12.0
|
||||
|
|
|
@ -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"""
|
||||
|
|
|
@ -1 +1 @@
|
|||
black==22.3.0
|
||||
black==22.12.0
|
||||
|
|
Loading…
Reference in a new issue