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:
Luke Robles 2023-10-13 10:18:44 -07:00
parent a5a2685b36
commit cf563ed6c9
2 changed files with 10 additions and 1 deletions

View File

@ -235,7 +235,7 @@ class StarCitizen(commands.Cog):
latest_incident.find_next("div", class_="issue no-underline")
.get("onclick")
.split("=")[-1]
.replace("\\", "")
.replace("\\", "").replace("'", "")
)
details = latest_incident.findNext("span", {"class": "issue__content"}).text

View File

@ -230,6 +230,15 @@ async def get_ship(ship_name):
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:
print(e)
embed = discord.Embed(description="", color=discord.Color.red(), type="rich")