I am using BeautifulSoup to scrape character info from a website. When trying to get the win rate of a character, BeautifulSoup can't find it.
When I inspect the text, it is listed as under . All I can find in the sites source code and all that BeautifulSoup finds is "ranking-stats-placeholder".
This is the code I am currently using.
import bs4
from urllib.request import urlopen as uReq
from bs4 import BeautifulSoup as soup
my_url = "https://u.gg/lol/champions/darius/build/?role=top"
#opening up connection, grabbing the page
uClient = uReq(my_url)
page_html = uClient.read()
uClient.close()
#html parsing
page_soup = soup(page_html, "html.parser")
#champion name
champ_name = page_soup.findAll("span", {"class":"champion-name"})[0].text
#champion win rate
champ_wr = page.soup.findAll("div", {"class":"win-rate okay-tier"})
I believe that the win rate text is added by javascript, but I have no idea how I can get the text. The code I currently have returns "None" for champ_wr