Scrape Election Data

scraping
studio
web

#1

Hi I am trying to scrape http://www.indiavotes.com/ website using UIpath.


This is the main table, the first column is a link which expands further to
http://www.indiavotes.com/pc/info/16/0
I need to click on export csv and save it in a folder(default or otherwise), also each PC Name value can further be clicked to find more details about each candidate as below
http://www.indiavotes.com/pc/detail/7767/61/16
Can anyone help me understand which components i can use to create the scraping workflow


#2

Hi @ramakrishna1592,

For example if first column need to be click one by one and each of them should be take some date u should scrape only first column with data. When you got already years then in loop use scraped data. For every year you need to use click activity and put in the selector variable where will be year.

  1. Scrap column year
  2. Use scraped years in loop
  3. In body use click activity to go to (here you should use variable with year)

http://www.indiavotes.com/pc/info/16/0

then again use click activity “export csv” then again in the same body loop click activity on “PC” to open:

http://www.indiavotes.com/pc/detail/7767/61/16

(u can do the same operation like before with years if you need use all the kind of “PC”) scrape needed element or use click activity depend what you need on this step. End last step in this process i go back to main page with years and loop start again.

Regards.
@fudi5


#4

Main.xaml (9.0 KB)
How do i get only the first element in the child, when i use highlight the complete row is getting highlighted


#5

I dont get it want you want. Can you make so screenshot or better describe problem ? Find TR whats that ? For what are you using hinglight ?


#6

Hey man figured it out finally attaching my solution based on what you suggested, optimisation always welcomed :slight_smile:Main.xaml (28.3 KB)


#7

Im happy to help you.

Great thanks from you for me will be “like” :slight_smile: my suggestions :slight_smile:
Regards
@fudi5


#8

This year 2014 is a static value… should be in this way ?