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