mirror of
https://gitlab.crans.org/mediatek/med.git
synced 2025-06-29 16:21:03 +02:00
Fix CI, add django22-py39 CI step
This commit is contained in:
@ -93,9 +93,9 @@ class MediaAdminForm(ModelForm):
|
||||
side_identifier_field.widget.template_name = "media/generate_side_identifier.html"
|
||||
|
||||
def download_data_isbndb(self, isbn):
|
||||
api_url = "https://api2.isbndb.com/book/" + str(isbn) + "?Authorization=" + os.getenv("ISBNDB_KEY")
|
||||
api_url = "https://api2.isbndb.com/book/" + str(isbn) + "?Authorization=" + os.getenv("ISBNDB_KEY", "")
|
||||
req = urllib.request.Request(api_url)
|
||||
req.add_header("Authorization", os.getenv("ISBNDB_KEY"))
|
||||
req.add_header("Authorization", os.getenv("ISBNDB_KEY", ""))
|
||||
try:
|
||||
with urllib.request.urlopen(req) as url:
|
||||
data: dict = json.loads(url.read().decode())["book"]
|
||||
|
Reference in New Issue
Block a user