I want to retrieve the course for different funds per day for the last 10 years, the information is available on http://www.morningstar.se/Funds/Quicktake/AdvancedCharts.aspx?perfid=0P00000M7O&programid=0000000000
I've used selenium but I can't get the elements for the dates or the price. When I run following code in debug mode and stop after the page has been loaded I can change dates with find_elements, hence not when I run it :(
from selenium import webdriver
import time
from selenium.webdriver.common.keys import Keys
class GetData:
def __init__(self):
self.start_page = "http://www.morningstar.se/Funds/Quicktake/AdvancedCharts.aspx?perfid=perfid=0P00000M7O&programid=0000000000"
self.browser = webdriver.Chrome()
def get_page(self):
self.browser.get(self.start_page)
time.sleep(1)
self.browser.find_elements_by_class_name('highcharts-range-selector')[0].send_keys('2017-01-01')
So I want to change dates (1) and retrive the day and price difference (2) in this case "22 jan, 2018" and "+3.82%"