Cleaning up some stuff and also adding the items uuid as a variable when using /ship, not sure what to do with it yet
This commit is contained in:
parent
8722119e70
commit
f0719e832b
@ -235,7 +235,7 @@ class StarCitizen(commands.Cog):
|
|||||||
latest_incident.find_next("div", class_="issue no-underline")
|
latest_incident.find_next("div", class_="issue no-underline")
|
||||||
.get("onclick")
|
.get("onclick")
|
||||||
.split("=")[-1]
|
.split("=")[-1]
|
||||||
.replace("\\", "")
|
.replace("\\", "").replace("'", "")
|
||||||
)
|
)
|
||||||
|
|
||||||
details = latest_incident.findNext("span", {"class": "issue__content"}).text
|
details = latest_incident.findNext("span", {"class": "issue__content"}).text
|
||||||
|
@ -230,6 +230,15 @@ async def get_ship(ship_name):
|
|||||||
|
|
||||||
embed.set_image(url=ship_image)
|
embed.set_image(url=ship_image)
|
||||||
|
|
||||||
|
try:
|
||||||
|
item_uuid = (
|
||||||
|
soup.find("div", {"class": "infobox__label"}, string="UUID")
|
||||||
|
.findNext("div", {"class": "infobox__data"})
|
||||||
|
.text
|
||||||
|
)
|
||||||
|
except Exception:
|
||||||
|
item_uuid = "N/A"
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
embed = discord.Embed(description="❌", color=discord.Color.red(), type="rich")
|
embed = discord.Embed(description="❌", color=discord.Color.red(), type="rich")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user