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:
|
try:
|
||||||
pledge_price = (
|
pledge_price = (
|
||||||
soup.find("div", {"class": "infobox__label"}, string="Standalone")
|
soup.find(
|
||||||
.findNext("span", {"class": "smwtext"})
|
"span", {"class": "ext-floatingui-reference"}, string="Standalone"
|
||||||
|
)
|
||||||
|
.findNext("div", {"class": "infobox__data"})
|
||||||
.text
|
.text
|
||||||
)
|
)
|
||||||
except Exception:
|
except Exception:
|
||||||
@ -413,8 +415,10 @@ async def get_ship(ship_name):
|
|||||||
embed.add_field(name="-------", value="", inline=False)
|
embed.add_field(name="-------", value="", inline=False)
|
||||||
try:
|
try:
|
||||||
length = (
|
length = (
|
||||||
soup.find("div", {"class": "infobox__label"}, string="Length")
|
soup.find(
|
||||||
.findNext("span", {"class": "smwtext"})
|
"div", {"class": "template-dimensions-label"}, string="Length"
|
||||||
|
)
|
||||||
|
.findNext("div", {"class": "template-dimensions-data"})
|
||||||
.text
|
.text
|
||||||
)
|
)
|
||||||
except Exception:
|
except Exception:
|
||||||
@ -424,8 +428,8 @@ async def get_ship(ship_name):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
width = (
|
width = (
|
||||||
soup.find("div", {"class": "infobox__label"}, string="Width")
|
soup.find("div", {"class": "template-dimensions-label"}, string="Width")
|
||||||
.findNext("span", {"class": "smwtext"})
|
.findNext("div", {"class": "template-dimensions-data"})
|
||||||
.text
|
.text
|
||||||
)
|
)
|
||||||
except Exception:
|
except Exception:
|
||||||
@ -435,8 +439,10 @@ async def get_ship(ship_name):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
height = (
|
height = (
|
||||||
soup.find("div", {"class": "infobox__label"}, string="Height")
|
soup.find(
|
||||||
.findNext("span", {"class": "smwtext"})
|
"div", {"class": "template-dimensions-label"}, string="Height"
|
||||||
|
)
|
||||||
|
.findNext("div", {"class": "template-dimensions-data"})
|
||||||
.text
|
.text
|
||||||
)
|
)
|
||||||
except Exception:
|
except Exception:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user