Fixing code if a ship is buyable at multiple locations, it was returning all locations you could rent at instead

This commit is contained in:
Luke Robles 2023-07-05 18:24:15 -07:00
parent f733906a23
commit 2812c7bebb
2 changed files with 5 additions and 1 deletions

0
app/bot.py Normal file → Executable file
View File

View File

@ -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(