From 9ac458a2ad9c7e65dc0dd4f8b999e403f12ca4ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janek=20Nouvertn=C3=A9?= Date: Sun, 26 Oct 2025 17:21:05 +0100 Subject: [PATCH] get author from email --- pypistats/views/general.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pypistats/views/general.py b/pypistats/views/general.py index 5295d48..399d6f5 100644 --- a/pypistats/views/general.py +++ b/pypistats/views/general.py @@ -124,6 +124,13 @@ def package_page(package): requires.add(package_name) metadata["requires"] = sorted(requires) metadata["optional"] = sorted(optional) + author = metadata["info"].get("author") + if author is None: + authors = metadata["info"].get("author_email") + if authors: + author = ", ".join([a.strip().rsplit(maxsplit=1)[0] for a in authors.split(",")]) + metadata["author"] = author + except Exception: pass