as some of you probably know by now, it seems that Yahoo! Finance has discontinued its API for stock market data. While I am aware of the existence of the fix-yahoo-finance solution, I was trying to implement a more stable solution to my code by directly scraping historical data from Yahoo.
So here is what I have for the moment:
import requests
from bs4 import BeautifulSoup
page = requests.get("https://finance.yahoo.com/quote/AAPL/history?period1=345423600&period2=1495922400&interval=1d&filter=history&frequency=1d")
soup = BeautifulSoup(page.content, 'html.parser')
soup
print(soup.prettify())
To get the data from Yahoo table I can do:
c=soup.find_all('tbody')
print(c)
My question is, how do I turn "c" into a nicer dataframe? Thanks!