From 9bbaeb602dfd6045ad1eeef02489bf632bca7664 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A5=D0=B0=D1=80=D0=B0=D0=BA=D0=B8=D1=80=D0=B8=20=D0=9C?= =?UTF-8?q?=D0=BE=D0=BB=D0=B8=D0=BC=D0=B0?= Date: Mon, 15 Aug 2022 22:32:21 +0900 Subject: [PATCH] =?UTF-8?q?'dc:creator'=E3=81=AE=E4=B8=AD=E8=BA=AB?= =?UTF-8?q?=E3=81=8CNone=E3=81=A0=E3=81=A3=E3=81=9F=E5=A0=B4=E5=90=88?= =?UTF-8?q?=E3=81=B8=E3=81=AE=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 下のAPIの仕様変更があったのかわかりませんが、たまに'dc:creator'の中身がNoneのため、その後の処理でエラーが起きていました。アドホックな修正方法ですみません。 --- jpndlpy/item_entity.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jpndlpy/item_entity.py b/jpndlpy/item_entity.py index 20b8173..5f41004 100644 --- a/jpndlpy/item_entity.py +++ b/jpndlpy/item_entity.py @@ -66,6 +66,8 @@ def extract_creator(self, item): creator_list = [] if 'dc:creator' in item: creator_list = item['dc:creator'] + if not creator_list: + return'' else: return ''