Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -140,7 +140,7 @@ def download_file_from_url(url, output_dir, filename):
|
|
| 140 |
def download_book_cover(book_id, output_dir):
|
| 141 |
"""Download book cover from Google Books API using Book ID."""
|
| 142 |
try:
|
| 143 |
-
image_url = f"
|
| 144 |
|
| 145 |
response = requests.get(image_url, timeout=30)
|
| 146 |
response.raise_for_status()
|
|
|
|
| 140 |
def download_book_cover(book_id, output_dir):
|
| 141 |
"""Download book cover from Google Books API using Book ID."""
|
| 142 |
try:
|
| 143 |
+
image_url = f"https://books.google.com/books/publisher/content/images/frontcover/{book_id}"
|
| 144 |
|
| 145 |
response = requests.get(image_url, timeout=30)
|
| 146 |
response.raise_for_status()
|