Skip to content

Commit

Permalink
fix: typeerror
Browse files Browse the repository at this point in the history
  • Loading branch information
beiyuouo committed Nov 4, 2022
1 parent f409efc commit 1d06025
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# dblp-watcher
# dblp-watcher

DBLP API: [Docs](https://dblp.org/faq/How+to+use+the+dblp+search+API.html)
5 changes: 4 additions & 1 deletion src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ def get_dblp_items(dblp_data):
res_item = {}
# format author
authors = get_item_info(item["info"], "authors")
authors = [author["text"] for author in authors["author"]]
try:
authors = [author["text"] for author in authors["author"]]
except TypeError:
authors = [authors["author"]["text"]]

logger.info(f"authors: {authors}")

Expand Down

0 comments on commit 1d06025

Please sign in to comment.