Extract email addresses from multiple websites

Im trying to extract email addresses from multiple websites, since the email addresses are on different positions on multiple websites I am trying to find (Ctrl+F) “@” to locate email. I want to select the whole email and copy it to excel respectively. Indicating UI element will not work as different websites have different UI. Is there any method/activities to copy the found email to excel?

@Shilldas_K_S

  1. Open Browser:
  • Use the “Open Browser” activity to open the website.
  1. Search for “@”:
  • Use the “Type Into” activity to simulate pressing Ctrl + F.
  • Type @ to open the Find dialog.
  1. Find Position of “@”:
  • Use the “Find Text Position” activity to locate the position of the “@” symbol.
  • Store the result in a variable, let’s call it emailPosition.
  1. Extract Text:
  • Use the “Get Text” activity to extract the email address using the position obtained in the previous step (emailPosition).
  1. Write to Excel:
  • Use the “Excel Application Scope” activity to open your Excel file.
  • Use the “Write Cell” activity to write the extracted email address to the desired cell.

@Shilldas_K_S

  1. Read Range (Excel file path)

→ Output: dtWebsites

  1. For Each Row (row In dtWebsites)
    Open Browser (row(“WebsiteURL”).ToString)
    Type Into (Ctrl + F)
    Type Into (“@” + “[Enter]”)
    Get Text (Output: emailText)

    1. Write Cell (Excel file path, emailText, “Sheet1”, “B” + row.RowNumber.ToString)
      Close Tab (if needed)

cheers…!

Hi @Shilldas_K_S

  1. Use “Read Range” activity to read the list of URLs from an Excel sheet.
  2. Use a “For Each Row” activity to iterate through each URL.
  3. Then use “Open Browser” activity to open the web page corresponding to the current URL.
  4. Use the “Get Text” or “Screen Scraping” activities to extract the entire text content of the web page.
  5. Use regular expressions to find and extract email addresses from the extracted text.
    For example:

emailMatches = Regex.Matches(pageText, “\b[A-Za-z0-9._%±]+@[A-Za-z0-9.-]+.[A-Z|a-z]{2,}\b”)

  1. Write the extracted email addresses to an Excel sheet using the “Write Cell” or “Write Range” activity.

Hi,

You can also use below steps:

  1. Open Website
  2. Use Get Text or Screen Scraping to extract text and store it in websiteText variable
  3. Assign emailList = websiteText.Split(" “c).Where(Function(word) word.Contains(”@")).ToList()
  4. For Each emailAddress In emailList
    Write the emailAddress to Excel using Write Cell or Write Range