comment out where to buy for now, its causing issues
This commit is contained in:
parent
445df6ba21
commit
a0af79eb88
@ -53,28 +53,29 @@ async def get_ship(ship_name):
|
||||
|
||||
embed.add_field(name="**Role**", value=ship_role)
|
||||
|
||||
# ingame_price = (
|
||||
# soup.find("div", {"class": "data-buycost infobox-data infobox-col2"})
|
||||
# .find("div", {"class": "infobox-data__value"})
|
||||
# .text
|
||||
# )
|
||||
|
||||
# Hideous code for "where to buy" in game
|
||||
table = soup.find("span", {"id": "Buying"}).findNext(
|
||||
"table", {"class": "wikitable"}
|
||||
ingame_price = (
|
||||
soup.find("div", {"class": "data-buycost infobox-data infobox-col2"})
|
||||
.find("div", {"class": "infobox-data__value"})
|
||||
.text
|
||||
)
|
||||
|
||||
locations = [x.text.replace("\n", "") for x in table.find_all("th")]
|
||||
prices = [x.text.replace("\n", "") for x in table.find_all("td")]
|
||||
zip_list = zip(locations, prices)
|
||||
# Hideous code for "where to buy" in game
|
||||
# table = soup.find("span", {"id": "Buying"}).findNext(
|
||||
# "table", {"class": "wikitable"}
|
||||
# )
|
||||
|
||||
result = list(zip_list)
|
||||
ingame_price = [x for x in result if "Unavailable" not in x]
|
||||
for x in ingame_price:
|
||||
ingame_price = " ".join(x) + " aUEC"
|
||||
# locations = [x.text.replace("\n", "") for x in table.find_all("th")]
|
||||
# prices = [x.text.replace("\n", "") for x in table.find_all("td")]
|
||||
# zip_list = zip(locations, prices)
|
||||
|
||||
if not len(ingame_price):
|
||||
ingame_price = "No in-game price available"
|
||||
# result = list(zip_list)
|
||||
# ingame_price = [x for x in result if "Unavailable" not in x]
|
||||
|
||||
# for x in ingame_price:
|
||||
# ingame_price = " ".join(x) + " aUEC"
|
||||
|
||||
# if not len(ingame_price):
|
||||
# ingame_price = "No in-game price available"
|
||||
embed.add_field(name="**Ingame Price**", value=ingame_price, inline=True)
|
||||
|
||||
pledge_price = (
|
||||
|
Loading…
x
Reference in New Issue
Block a user