Account for no ship pricing on finder.cstone's site
This commit is contained in:
parent
7e3af704c2
commit
6e904d3505
@ -206,14 +206,18 @@ async def get_ship(ship_name):
|
|||||||
price_table = price_soup.find("div", class_="pricetab").find_next("table")
|
price_table = price_soup.find("div", class_="pricetab").find_next("table")
|
||||||
|
|
||||||
second_row = price_table.find_all("tr")[1]
|
second_row = price_table.find_all("tr")[1]
|
||||||
ingame_price = (
|
|
||||||
second_row.find_all("td")[1].get_text(strip=True).replace(" ", ",")
|
|
||||||
)
|
|
||||||
|
|
||||||
price = "[%s](https://finder.cstone.space/ShipShops1/%s)" % (
|
if "Not sold directly or at all" in second_row.text:
|
||||||
ingame_price,
|
price = "N/A"
|
||||||
item_uuid,
|
else:
|
||||||
)
|
ingame_price = (
|
||||||
|
second_row.find_all("td")[1].get_text(strip=True).replace(" ", ",")
|
||||||
|
)
|
||||||
|
|
||||||
|
price = "[%s](https://finder.cstone.space/ShipShops1/%s)" % (
|
||||||
|
ingame_price,
|
||||||
|
item_uuid,
|
||||||
|
)
|
||||||
|
|
||||||
if "Not available" in ingame_price:
|
if "Not available" in ingame_price:
|
||||||
price = "N/A"
|
price = "N/A"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user