Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -47,7 +47,7 @@ def search_for_books(author: str = '', title: str = '') -> str:
|
|
| 47 |
return 'Must provide at least one of author or title.'
|
| 48 |
|
| 49 |
try:
|
| 50 |
-
search_terms = ' '.join(author, title)
|
| 51 |
params = {"search": search_terms}
|
| 52 |
base_url = 'https://gutendex.com/books'
|
| 53 |
response = requests.get(base_url, params=params)
|
|
@@ -71,7 +71,7 @@ def search_for_books(author: str = '', title: str = '') -> str:
|
|
| 71 |
return results
|
| 72 |
|
| 73 |
except Exception as e:
|
| 74 |
-
|
| 75 |
|
| 76 |
|
| 77 |
|
|
|
|
| 47 |
return 'Must provide at least one of author or title.'
|
| 48 |
|
| 49 |
try:
|
| 50 |
+
search_terms = ' '.join([author, title])
|
| 51 |
params = {"search": search_terms}
|
| 52 |
base_url = 'https://gutendex.com/books'
|
| 53 |
response = requests.get(base_url, params=params)
|
|
|
|
| 71 |
return results
|
| 72 |
|
| 73 |
except Exception as e:
|
| 74 |
+
raise e
|
| 75 |
|
| 76 |
|
| 77 |
|