Check out any of the links below to see posts on that topic:
About TheAutomatic.net
Welcome to TheAutomatic.net! This site is meant to help you learn how to automate everyday tasks by writing open source code. Here we’ll teach you to programmatically download stock and fundamentals data, automate creating and moving around files, extract data from Word documents and PDF files, and a host of other tasks. Please click to read any of the blog posts on the right side of the page.
Yahoo_fin Documentation
Yahoo_fin is a package I wrote for easily downloading historical and real-time stock price data, information on market caps and dividends, fundamentals data (e.g. balance sheets, income statements, cash flows), and ticker lists comprising several exchanges. It can also download options prices and data on crytocurrencies.