Finding Proper Selector to Scrape screen

Hi All,

I’m developing a bot to scrape phone numbers from Google map. I’m unable to find the proper selector to scrape the phone number. I tried Attach live elements. For few Companies the bot is scraping the phone number but some times it scrapes the nearby fields. Can someone help me with this?

Eg:

  1. Cognizant Technology Solutions Can-10008
    5140 Yonge St 7th floor, North York, ON M2N 6L7, Canada

Scrapped Number : +1 416-649-4700

  1. W. D. Potato Ltd Us
    3644 Sideroad 10, Beeton, ON L0G 1A0, Canada

Scrapped Number : +1 905-729-2263

  1. CDQ Co-op Ltd (admin)-967500
    90 Freeport Blvd NE, Calgary, AB T3J 5J9, Canada

Scrapped Number : Claim this business

4.Shell Canada Products-835646
Shell Centre, 400 4 Ave SW, Calgary, AB T2P 0J4, Canada

Scrapped Number : shell.ca

5.Up Workshop
180 Strachan Ave, Toronto, ON M6J 2S9, Canada

Scrapped Number : Add hours

Thanks in advance!

You can use regular expression to find phone number fields.

Like for mobile numbers, regular expression is
^+[1-9]{1}[0-9]{3,14}$

Using Uipath.Core.Activities.Matches you can find such elements and fetch the phone numbers.

~Rupesh

1 Like

Hi Rupesh,

I’m unable to find phone numbers using regular expression. I have uploaded the xaml file with 2 sample vendor name. Can you help me with this?

Test.xaml (8.9 KB)

Thanks!

Hi,

Please find attached workflow to scrape phone number, It’s working fine for both the cases you provided, test it for other cases.
Test.xaml (11.9 KB)

1 Like

Hi Bharat,

Thanks for the test file. It’s not working for the other companies.

W. D. Potato Ltd Us
3644 Sideroad 10, Beeton, ON L0G 1A0, Canada
Scrapped Number : +1 905-729-2263

CDQ Co-op Ltd (admin)-967500
90 Freeport Blvd NE, Calgary, AB T3J 5J9, Canada
Scrapped Number : Claim this business

4.Shell Canada Products-835646
Shell Centre, 400 4 Ave SW, Calgary, AB T2P 0J4, Canada

Scrapped Number : shell.ca

5.Up Workshop
180 Strachan Ave, Toronto, ON M6J 2S9, Canada

Scrapped Number : Add hours

image

Hi

I have tested for all of the locations you provided, it’s working on my machine.
Please make sure phone number is available on the screen after address search without any other popup or screen.

Thanks