Categories
Development

Not able to scrap dynamic content using Selenium or BeautifulSoup

I’m trying to scrap dynamic content from the URL: https://www.prokabaddi.com/stats/0-102-total-points-statistics. Have tried using selenium, BeautifulSoup but both fetch me an empty list.
My Code is:

url = "https://www.prokabaddi.com/stats/0-102-total-points-statistics"

# create a new Chrome session
driver = webdriver.Chrome()
driver.get(url) 
soup.find_all("div", class_="sipk-lb-playerName")

This returns an empty list. The data is present when I check it in the console but in the page source the data and the div tags are not present. I believe it has something to do with the js rendered content.

How can I extract the player names and points from this URL.

Leave a Reply

Your email address will not be published. Required fields are marked *