Add loaner to /ship command if it exists on the page

This commit is contained in:
Luke Robles 2023-11-25 10:26:54 -08:00
parent 691251e57e
commit 73888f2216

View File

@ -151,6 +151,19 @@ async def get_ship(ship_name):
value=pledge_price,
inline=True,
)
try:
loaner = (
soup.find("div", {"class": "infobox__label"}, string="Loaner")
.findNext("div", {"class": "infobox__data"})
.text
)
embed.add_field(
name="**Loaner**",
value=loaner,
inline=True,
)
except Exception:
pass
try:
buy_location = (