From c679d87f250629fa3543dc6246bfe12ca6264201 Mon Sep 17 00:00:00 2001 From: Luke Robles Date: Mon, 1 May 2023 20:44:12 -0700 Subject: [PATCH] dont capitalize the ship name --- app/star_citizen.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/star_citizen.py b/app/star_citizen.py index 6b5a4b8f..49e410bf 100644 --- a/app/star_citizen.py +++ b/app/star_citizen.py @@ -8,7 +8,7 @@ async def get_ship(ship_name): wiki_url = "https://starcitizen.tools/" try: - wiki_ship_name = "_".join(elem.capitalize() for elem in ship_name.split()) + wiki_ship_name = "_".join(elem for elem in ship_name.split()) # print(wiki_ship_name) # print("%s%s" % (wiki_url, wiki_ship_name)) @@ -59,7 +59,7 @@ async def get_ship(ship_name): .text ) - # Hideous code for "where to buy" in game + ## Hideous code for "where to buy" in game # table = soup.find("span", {"id": "Buying"}).findNext( # "table", {"class": "wikitable"} # ) @@ -134,8 +134,8 @@ async def get_ship(ship_name): embed.add_field( name="**Expedite claim time**", value=expedited_claim_time, inline=True ) - except Exception: - pass + except Exception as e: + print(e) try: expedited_fee = ( @@ -146,7 +146,8 @@ async def get_ship(ship_name): .text ) embed.add_field(name="**Expedite Fee**", value=expedited_fee, inline=True) - except Exception: + except Exception as e: + print(e) pass embed.add_field( @@ -163,6 +164,7 @@ async def get_ship(ship_name): % ship_name, inline=True, ) + print(e) return embed return embed