From 740a0e20015b20705d3a1264ae1d7a6e26185acb Mon Sep 17 00:00:00 2001 From: Luke Robles Date: Sun, 30 Apr 2023 15:21:54 -0700 Subject: [PATCH] Some updates to how the format looks --- app/star_citizen.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/app/star_citizen.py b/app/star_citizen.py index 7087a94d..c6d5df38 100644 --- a/app/star_citizen.py +++ b/app/star_citizen.py @@ -29,11 +29,22 @@ async def get_ship(ship_name): .replace("400px", "1920px") ) + ship_name_on_page = ( + soup.find("tr", {"class": "infobox-title"}).findNext("th").text + ) + manufacturer = ( + soup.find("tr", {"class": "data-manufacturer"}).findNext("a").text + ) + embed.set_thumbnail( url="https://media.robertsspaceindustries.com/t0q21kbb3zrpt/source.png" ) - embed.set_author(name="Info about the %s" % ship_name) + embed.set_author( + name="%s %s" % (manufacturer, ship_name_on_page), + url="%s%s" % (wiki_url, wiki_ship_name), + ) + try: # ingame_price = ( # soup.find("div", {"class": "data-buycost infobox-data infobox-col2"})