Some simple script for fetching stock data from finviz.com and export the data to CSV files.
It uses this small lib finviz-data for fetching and extracting the data.
git clone https://github.com/diversen/finviz_scraper
cd finviz_scraper
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
cp settings.py-dist settings.py
Save sp500 as a CSV file in the folder ./csv
python csv_from_sp500.py
Or save nasdaq symbols as a CSV file in ./csv
:
python csv_from_nasdaq.py