Reputation: 21
I need to automate data extraction process from the website "nepsealpha.com/nepse-data", by providing input values for start date, end date and stock symbol automatically(stock symbols may need to be defined as list in another excel sheet if required). I do not see the element ID or Name in the code after I click inspect tab in website, which is restricting me from providing Input values and click submit button to extract the results and save to the excel file. I would prefer one time five years historical data extracted for all the stocks in one excel sheet and then one excel sheet to be extracted every day for all stock indices available in the input list.
Sample start Code below needs code additions as mentioned:
Sub SeleniumTest()
Set mybrowser = New Selenium.ChromeDriver
mybrowser.Start baseUrl:="https://www.google.com"
'mybrowser.Start baseUrl:="https://www.nepsealpha.com/nepse-data"
mybrowser.Get ("/")
mybrowser.FindElementById("APjFqb").SendKeys "madhu"
mybrowser.Wait (100)
mybrowser.FindElementByName("btnK").Click
End Sub
It would be better if I could get the data extraction process automation code in Excel vba along with a looping process to go through each stock symbol for a start date/end date combination provided(one for all historical 5 years data and one for each day data afterwards).
Upvotes: 0
Views: 82