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