mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2025-12-29 17:44:50 +00:00
Add pypi search
This commit is contained in:
parent
d0923be1c9
commit
869aebd681
1 changed files with 1 additions and 1 deletions
|
|
@ -103,7 +103,7 @@ async def pypi_getdata(_, callback_query):
|
|||
try:
|
||||
html = await http.get(f"https://pypi.org/pypi/{pkgname}/json", headers=headers)
|
||||
res = html.json()
|
||||
requirement = "".join(f"{i}, " for i in res.get("requires_dist", "Unknown"))
|
||||
requirement = "".join(f"{i}, " for i in res["info"].get("requires_dist")) if res["info"].get("requires_dist") else "Unknown"
|
||||
msg = ""
|
||||
msg += f"<b>Package Name:</b> {res['info'].get('name', 'Unknown')}\n"
|
||||
msg += f"<b>Version:</b> {res['info'].get('version', 'Unknown')}\n"
|
||||
|
|
|
|||
Loading…
Reference in a new issue