Fix how i find the locations taht a ship is sold at

This commit is contained in:
Luke Robles 2023-12-24 17:28:52 -08:00
parent b09a691b05
commit cb99e1d1a1

View File

@ -272,9 +272,12 @@ async def get_ship(ship_name):
try:
price_table = price_soup.find("div", class_="pricetab").find_next("table")
second_row = price_table.find_all("tr")[1]
buy_location = (
second_row.find_all("td")[0].get_text(strip=True).split("-")[-1]
buy_location = ", ".join(
[
x.find("td").get_text(strip=True).split("-")[-1].strip()
for x in price_table.find_all("tr")
if x.find("td")
]
)
embed.add_field(
name="**Buyable At**",