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"http://books.google.com/books/content?id={book_id}&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api"
|
| 144 |
|
| 145 |
response = requests.get(image_url, timeout=30)
|
| 146 |
response.raise_for_status()
|