Fixing the /ship command to work with the new wiki elements
This commit is contained in:
parent
e836e57de9
commit
81b71e4bce
@ -261,8 +261,10 @@ async def get_ship(ship_name):
|
||||
)
|
||||
try:
|
||||
pledge_price = (
|
||||
soup.find("div", {"class": "infobox__label"}, string="Standalone")
|
||||
.findNext("span", {"class": "smwtext"})
|
||||
soup.find(
|
||||
"span", {"class": "ext-floatingui-reference"}, string="Standalone"
|
||||
)
|
||||
.findNext("div", {"class": "infobox__data"})
|
||||
.text
|
||||
)
|
||||
except Exception:
|
||||
@ -413,8 +415,10 @@ async def get_ship(ship_name):
|
||||
embed.add_field(name="-------", value="", inline=False)
|
||||
try:
|
||||
length = (
|
||||
soup.find("div", {"class": "infobox__label"}, string="Length")
|
||||
.findNext("span", {"class": "smwtext"})
|
||||
soup.find(
|
||||
"div", {"class": "template-dimensions-label"}, string="Length"
|
||||
)
|
||||
.findNext("div", {"class": "template-dimensions-data"})
|
||||
.text
|
||||
)
|
||||
except Exception:
|
||||
@ -424,8 +428,8 @@ async def get_ship(ship_name):
|
||||
|
||||
try:
|
||||
width = (
|
||||
soup.find("div", {"class": "infobox__label"}, string="Width")
|
||||
.findNext("span", {"class": "smwtext"})
|
||||
soup.find("div", {"class": "template-dimensions-label"}, string="Width")
|
||||
.findNext("div", {"class": "template-dimensions-data"})
|
||||
.text
|
||||
)
|
||||
except Exception:
|
||||
@ -435,8 +439,10 @@ async def get_ship(ship_name):
|
||||
|
||||
try:
|
||||
height = (
|
||||
soup.find("div", {"class": "infobox__label"}, string="Height")
|
||||
.findNext("span", {"class": "smwtext"})
|
||||
soup.find(
|
||||
"div", {"class": "template-dimensions-label"}, string="Height"
|
||||
)
|
||||
.findNext("div", {"class": "template-dimensions-data"})
|
||||
.text
|
||||
)
|
||||
except Exception:
|
||||
|
Loading…
x
Reference in New Issue
Block a user