From 54597a3a4d4724fe0fdf8f681ab15773da8ed72b Mon Sep 17 00:00:00 2001 From: ytshen Date: Thu, 16 Nov 2023 22:59:31 +0800 Subject: [PATCH] fix author name null --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 98e5d4c..dcd443a 100644 --- a/main.py +++ b/main.py @@ -54,8 +54,8 @@ def parse(plugin, **kwargs): author_resp = requests.get(author_url, headers=headers) author_resp_info = json.loads(author_resp.content) plugin_author = {} - if 'name' in author_resp_info: - plugin_author[name] = author_resp_info['name'] + plugin_author[name] = author_resp_info['name'] if 'name' in author_resp_info and author_resp_info['name'] \ + else plugin[repo].split('/')[0] if 'html_url' in author_resp_info: plugin_author[url] = author_resp_info['html_url'] if 'avatar_url' in author_resp_info: