from selenium import webdriver
browser=webdriver.Chrome('./chromedriver')
browser.get('https://www1.nseindia.com/products/content/equities/indices/historical_pepb.htm')
startDate=browser.find_element_by_id('fromDate')
startDate.send_keys('31-07-2000')
endDate=browser.find_element_by_id('toDate')
endDate.send_keys('30-06-2001')
peBox=browser.find_element_by_id('yield1')
peBox.click()
#getData=browser.find_element_by_id('get')
#getData.click()
#downLoadCSV=browser.find_element_by_link_text('Download file in csv format')
#downLoadCSV.click()
The above code opens Chrome browser, change as required.
I've commented out the parts that don't work. It'll take you till you have to press a button with "Get Data" written on it. Clicking on this button opens a little empty box instead of the data I need to access. This is what happens when I automate the click as well.
When I open the browser and complete the steps manually I'm able to access the data, no problem. Is the site blocking me from web-scraping? Have tried this on both Chrome and Firefox with the same results.