app: Include amazon links.

This commit is contained in:
Vishnu KS
2020-09-27 16:02:12 +05:30
parent 18ef998136
commit c6197e9646
13 changed files with 6377 additions and 239 deletions

View File

@@ -15,6 +15,7 @@ required_fields = [
"image_url",
"description",
"category",
"amazon_url",
]
@@ -63,22 +64,11 @@ if __name__ == "__main__":
indent=4,
separators=(",", ": "),
)
book_list = []
for _, book in existing_book_names_to_details.items():
book_list.append(book)
with open("books_list.json", "w") as f:
json.dump(book_list, f, sort_keys=True, indent=4, separators=(",", ": "))
else:
print(f"❌ Error while fetching {title}")
time.sleep(1)
book_list = []
for _, book in existing_book_names_to_details.items():
book_list.append(book)
with open("books.json", "w") as f:
json.dump(
existing_book_names_to_details,
f,
sort_keys=True,
indent=4,
separators=(",", ": "),
)
with open("books_list.json", "w") as f:
json.dump(book_list, f, sort_keys=True, indent=4, separators=(",", ": "))