Skip to content

Typo #5750

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 2, 2021
Merged

Typo #5750

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions web_programming/search_books_by_isbn.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def get_openlibrary_data(olid: str = "isbn/0140328726") -> dict:
return requests.get(f"https://openlibrary.org/{new_olid}.json").json()


def summerize_book(ol_book_data: dict) -> dict:
def summarize_book(ol_book_data: dict) -> dict:
"""
Given Open Library book data, return a summary as a Python dict.

Expand Down Expand Up @@ -70,7 +70,7 @@ def summerize_book(ol_book_data: dict) -> dict:
print(f"\nSearching Open Library for ISBN: {isbn}...\n")

try:
book_summary = summerize_book(get_openlibrary_data(f"isbn/{isbn}"))
book_summary = summarize_book(get_openlibrary_data(f"isbn/{isbn}"))
print("\n".join(f"{key}: {value}" for key, value in book_summary.items()))
except JSONDecodeError: # Workaround for requests.exceptions.RequestException:
print(f"Sorry, there are no results for ISBN: {isbn}.")