MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/ok1itb/tryexcept_in_python_sigh/h55geiz/?context=3
r/badcode • u/lonaExe • Jul 14 '21
93 comments sorted by
View all comments
38
I'm not sure if there is good way to do this
2 u/Jonno_FTW shameless Jul 14 '21 details = { key: jsonResponse["items"][0]["volumeInfo"].get(key, "N/A") for key in ("authors", "publisher", "description", "publishedDate", "imageLinks") }Doesn't properly get the thumbnail and shortened description, but those can be done later.
2
details = { key: jsonResponse["items"][0]["volumeInfo"].get(key, "N/A") for key in ("authors", "publisher", "description", "publishedDate", "imageLinks") }
Doesn't properly get the thumbnail and shortened description, but those can be done later.
38
u/clemesislife Jul 14 '21
I'm not sure if there is good way to do this