utils: Create basic tool to generate json files.

This commit is contained in:
Vishnu KS
2020-08-23 16:06:46 +05:30
parent d723ec905b
commit 843ed75db7
3 changed files with 2617 additions and 2850 deletions

View File

@@ -21,6 +21,9 @@ def get_details(book_object):
book_object["rating"] = book.find("average_rating").text
book_object["pages"] = book.find("num_pages").text
book_object["image_url"] = book.find("image_url").text
book_object["description"] = book.find("description").text
book_object["isbn"] = book.find("isbn").text
return True
except urllib.error.HTTPError as e:
print(
"Error getting book details from GoodReads for book: {}. \nGot error: ".format(
@@ -28,6 +31,7 @@ def get_details(book_object):
)
)
print(str(e.getcode()) + " " + e.msg)
return False
def get_goodread_info(library, force):