Here's the specific package that I'm using: https://github.com/ranaroussi/yfinance
I wonder if it is legal to scrape stock market data and then republish it.
Secondly, it isn't legal. They are protected by license agreement.
But stock prices is not what the value of SNL Financial and/or Capital IQ is for most people. I know a bunch of people who pay the $30K license fee for these (as well as Bloomberg etc) who barely use the stock price at all.