dont capitalize the ship name
This commit is contained in:
parent
04b3a95ab4
commit
2ebc6d4319
@ -8,7 +8,7 @@ async def get_ship(ship_name):
|
|||||||
wiki_url = "https://starcitizen.tools/"
|
wiki_url = "https://starcitizen.tools/"
|
||||||
|
|
||||||
try:
|
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(wiki_ship_name)
|
||||||
# print("%s%s" % (wiki_url, wiki_ship_name))
|
# print("%s%s" % (wiki_url, wiki_ship_name))
|
||||||
@ -59,7 +59,7 @@ async def get_ship(ship_name):
|
|||||||
.text
|
.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 = soup.find("span", {"id": "Buying"}).findNext(
|
||||||
# "table", {"class": "wikitable"}
|
# "table", {"class": "wikitable"}
|
||||||
# )
|
# )
|
||||||
@ -134,8 +134,8 @@ async def get_ship(ship_name):
|
|||||||
embed.add_field(
|
embed.add_field(
|
||||||
name="**Expedite claim time**", value=expedited_claim_time, inline=True
|
name="**Expedite claim time**", value=expedited_claim_time, inline=True
|
||||||
)
|
)
|
||||||
except Exception:
|
except Exception as e:
|
||||||
pass
|
print(e)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
expedited_fee = (
|
expedited_fee = (
|
||||||
@ -146,7 +146,8 @@ async def get_ship(ship_name):
|
|||||||
.text
|
.text
|
||||||
)
|
)
|
||||||
embed.add_field(name="**Expedite Fee**", value=expedited_fee, inline=True)
|
embed.add_field(name="**Expedite Fee**", value=expedited_fee, inline=True)
|
||||||
except Exception:
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
pass
|
pass
|
||||||
|
|
||||||
embed.add_field(
|
embed.add_field(
|
||||||
@ -163,6 +164,7 @@ async def get_ship(ship_name):
|
|||||||
% ship_name,
|
% ship_name,
|
||||||
inline=True,
|
inline=True,
|
||||||
)
|
)
|
||||||
|
print(e)
|
||||||
return embed
|
return embed
|
||||||
|
|
||||||
return embed
|
return embed
|
||||||
|
Loading…
x
Reference in New Issue
Block a user