Reputation: 19
I'm trying to input data based on column "A" into column "B". If "A" is a comprehensive list of website urls, would it be possible to run a script that scrapes the phone numbers, for example, from these websites and inputs into column "B"?
I am 100% newbie to scripting, but would love to learn how this works.
Upvotes: 1
Views: 175
Reputation: 12018
Assuming each cell in Column A
is one url, you definitely can scrape for phone numbers.
The code to achieve this:
B2: =JOIN("|",IMPORTXML(A2,"//a/@href"))
C2: =REGEXEXTRACT(B2,"[0-9]{3}[- ]*[0-9]{3}[- ]*[0-9]{4}")
Upvotes: 2