From 4ffc6fe0856c62ec7d72f003294155f9d4aca788 Mon Sep 17 00:00:00 2001 From: Luke Robles Date: Sun, 24 Dec 2023 17:28:52 -0800 Subject: [PATCH] Fix how i find the locations taht a ship is sold at --- app/star_citizen.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/star_citizen.py b/app/star_citizen.py index 71a3f74a..914e31e2 100755 --- a/app/star_citizen.py +++ b/app/star_citizen.py @@ -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**",