I was trying to collect some information about stocks I like.
example for stock : https://www.macrotrends.net/stocks/chart...ent?freq=A
I made a script to scrap the table contents in the website.
I printed the soup variable and noticed that no values exist in the table.
I tried to check if the website load a json file that has the table content but couldn't find any.
I only found a json files that has the stock names and ticker which is not useful to me.
it seems the website is tricky.
I appreciate any help.
example for stock : https://www.macrotrends.net/stocks/chart...ent?freq=A
I made a script to scrap the table contents in the website.
myURL = 'https://www.macrotrends.net/stocks/charts/MSFT/microsoft/income-statement?freq=A' page = requests.get(myURL) soup = bs4.BeautifulSoup(page.content, 'html.parser') stockData = soup.find_all(class_="jqx-grid-cell jqx-item jqx-grid-cell-selected jqx-fill-state-pressed") print(stockData)The stockData is always empty.
I printed the soup variable and noticed that no values exist in the table.
I tried to check if the website load a json file that has the table content but couldn't find any.
I only found a json files that has the stock names and ticker which is not useful to me.
it seems the website is tricky.
I appreciate any help.