From fb3646f13487c17cca1aa9f8b319a4ce5d754114 Mon Sep 17 00:00:00 2001 From: Luke Robles Date: Wed, 5 Jul 2023 18:24:15 -0700 Subject: [PATCH] Fixing code if a ship is buyable at multiple locations, it was returning all locations you could rent at instead --- app/bot.py | 0 app/star_citizen.py | 6 +++++- 2 files changed, 5 insertions(+), 1 deletion(-) mode change 100644 => 100755 app/bot.py diff --git a/app/bot.py b/app/bot.py old mode 100644 new mode 100755 diff --git a/app/star_citizen.py b/app/star_citizen.py index 955cb1f2..6ced8486 100755 --- a/app/star_citizen.py +++ b/app/star_citizen.py @@ -105,7 +105,11 @@ async def get_ship(ship_name): inline=True, ) - buy_location = soup.find_all("td", {"class": "Location smwtype_wpg"}) + buy_location = ( + soup.find("span", {"id": "Universe_availability"}) + .findNext("tbody") + .find_all("td", {"class", "Location smwtype_wpg"}) + ) if len(buy_location): embed.add_field(