Add followers to the boss blurb
This commit is contained in:
parent
77d546f28f
commit
ae72504a7d
@ -168,9 +168,7 @@ class Tarkov(commands.Cog):
|
||||
)
|
||||
|
||||
embed.set_author(name="Boss Spawn chances by map")
|
||||
embed.set_thumbnail(
|
||||
url="https://i.ytimg.com/vi/Yis5rmgo_bM/maxresdefault.jpg"
|
||||
)
|
||||
embed.set_thumbnail(url="https://i.ytimg.com/vi/Yis5rmgo_bM/maxresdefault.jpg")
|
||||
|
||||
query = """
|
||||
{
|
||||
@ -239,7 +237,6 @@ class Tarkov(commands.Cog):
|
||||
)
|
||||
|
||||
wiki_url = "https://escapefromtarkov.fandom.com/wiki/"
|
||||
# boss_name = "Tagilla"
|
||||
|
||||
response = requests.get(wiki_url + boss_name).text
|
||||
soup = BeautifulSoup(response, "html.parser")
|
||||
@ -249,6 +246,13 @@ class Tarkov(commands.Cog):
|
||||
health = soup.find("table", class_="wikitable").find_next("td").text.rstrip()
|
||||
embed.add_field(name="Health", value=health, inline=False)
|
||||
|
||||
followers = "None"
|
||||
if soup.find("span", id="Followers"):
|
||||
# Find the amount of followers in the text
|
||||
followers = soup.find("span", id="Followers").find_next("p").text
|
||||
|
||||
embed.add_field(name="Followers", value=followers, inline=False)
|
||||
|
||||
spawn_chance = "%\n".join(
|
||||
soup.find("td", class_="va-infobox-label", string="Spawn chance")
|
||||
.find_next("td", class_="va-infobox-content")
|
||||
@ -256,6 +260,7 @@ class Tarkov(commands.Cog):
|
||||
)
|
||||
|
||||
embed.add_field(name="Spawn Chance", value=spawn_chance, inline=False)
|
||||
|
||||
await ctx.send_followup(embed=embed)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user