Extract NSE Website Data | Automation Anywhere

 RPA | A2019 How to Extract NSE Website Data| Automation Anywhere - Part-43


A2019 Extract NSE Website Data  - In this blog we will discuss the steps how to extract NSE website data and write the extracted data into the text file using A2019 Automation Anywhere also known as Automation 360.

The steps that we must follow while trying to extract data i.e. the tabular data that is present in the NSE website are as follows:-

  • Open the NSE website url i.e. "https://economictimes.indiatimes.com/markets/nifty-50/indexsummary/indexid-2369,exchange-50.cms" using the open action that is present under the browser package. In the properties section select the browser on which we want to work i.e. google chrome, internet explorer, Mozilla Firefox, Microsoft edge etc. then pass in the url of the website which we want to open and then select the timeout option. By default the timeout value is 240 seconds.
  • Drag and drop the capture action from the recorder package and capture the first element present in the table and try to also capture the second element present in the first column of that table. In the properties section in the action to take on object select "Get Property" action and in the property name write HTML InnerText and store the output in a string variable data type.
Note: After capturing the first two elements then check which HTML property is changing then we have to make changes to the DOM XPath accordingly.

  • Now drag and drop loop action present under the loop package and in the properties section select while loop and in the drop down select recorder condition and again capture the first element which means the loop will continue until there are no more records in the table.
  • Drag and drop the capture action from the recorder package and this time capture the first element from the second column and also capture the second element from the second column of the table.

Note: After capturing the first two elements then check which HTML property is changing then we have to make changes to the DOM XPath accordingly.
  • Then drag and drop Log to file action to write the desired extracted data into the text file. In the properties section browse for the text file from the required folder location.
  • In the enter text to log pass in the variables that we have used while recorder capture action to store the output. The variables that we will pass in this field will display the output in the text file.
  • Now drag and drop the Number increment action to increment the counter variable we have created. In the properties section in the Enter number field pass in the counter variable which we have created and in the enter increment value pass in 1 which is the default value and store the output in the same counter variable which we have already created.
  • In the last we have to close the browser window for that we have to drag and drop the close action from the windows package. In the properties section pass in the window name which we have to close the window.
After we have discussed the steps here is the code screenshot that we have developed which is as follows:

NSE Data

So with that we have come to the end of this blog where we discussed how we can extract data from NSE website and write the extracted data to a text file using A2019 Automation Anywhere which is now known as Automation 360.

If you have any queries regarding this article then you can raise your queries in the comment section and I will be more than happy to answer all your queries.

Lastly I would request everyone of you to please provide your feedback as the feedback you provides really matters the most to me.

Comments

Post a Comment

If you have any doubts, please letme know.