1
0
mirror of https://github.com/craigerl/aprsd.git synced 2024-11-18 06:11:49 -05:00

Fix PyPI scraping

This commit is contained in:
ranguli 2022-10-27 12:33:31 -02:30
parent 74e4e2c4f5
commit 9ffd320353

View File

@ -174,7 +174,7 @@ def show_pypi_plugins(installed_plugins, console):
link = urljoin(api_url, snippet.get("href"))
package = re.sub(r"\s+", " ", snippet.select_one('span[class*="name"]').text.strip())
version = re.sub(r"\s+", " ", snippet.select_one('span[class*="version"]').text.strip())
released = re.sub(r"\s+", " ", snippet.select_one('span[class*="released"]').text.strip())
created = re.sub(r"\s+", " ", snippet.select_one('span[class*="created"]').text.strip())
description = re.sub(r"\s+", " ", snippet.select_one('p[class*="description"]').text.strip())
emoji = ":open_file_folder:"
@ -189,7 +189,7 @@ def show_pypi_plugins(installed_plugins, console):
table.add_row(
f"[link={link}]{emoji}[/link] {package}",
description, version, released, installed,
description, version, created, installed,
)
console.print("\n")