dont capitalize the ship name

This commit is contained in:
Luke Robles 2023-05-01 20:44:12 -07:00
parent a0af79eb88
commit b0a5139ac2

View File

@ -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