I am looking for some way to get index ticker lists. I'd like an up to date source and a practical way to get data. Exemple for sp500 I currently use:
import pandas as pd
import numpy as np
sp500 = pd.read_html('https://en.wikipedia.org/wiki/List_of_S%26P_500_companies')
sp500_list = np.array(sp500[0]['Symbol'])
I am not entirely happy with this solution as wikipedia might not be entirely up to date, the thing to scrap depend on the index (for cac40 we need to scrap the second or third table in the page) and the pipeline depend on the read_html pandas function. I'd like something a bit more polished, with additional indices. Know something that could do the job ?