I am new to Python and am currently trying to figure out how to scrape data from this web:
https://www.iea.org/sankey/#?c=Indonesia&s=Balance
i have tried using BS and selenium but it didnt work. Need data that showed inside the diagram. Thank you for your answer
i tried using python and BS, i expect a table would came out but it didnt
import requests
from bs4 import BeautifulSoup
url = "https://www.iea.org/sankey/#?c=Indonesia&s=Balance"
response = requests.get(url)
html_content = response.content
soup = BeautifulSoup(html_content, 'html.parser')
data = soup.find_all('div', {'class': 'sankey-data'})[0].text
print(data)