Jul-31-2019, 08:34 PM
Should look if there a is API for Macrotrends.
Can't find a doc for it,but there is way to download.
Still take some time as stock sites take some time to load.
The other way can be to inspect site eg network traffic and see if can catch eg json data.
This can vary from easy to very tricky.
Can't find a doc for it,but there is way to download.
http://download.macrotrends.net/assets/php/stock_data_export.php?t=[SYMBOL NAME] # Eg give csv file back http://download.macrotrends.net/assets/php/stock_data_export.php?t=MSFTCan be faster if not loading browser using
--headless
and don't need time.sleep() as put in a first test.Still take some time as stock sites take some time to load.
The other way can be to inspect site eg network traffic and see if can catch eg json data.
This can vary from easy to very tricky.