[SOLVED] Extracting email address from LinkedIn 1st degree connection

[UPDATE]

I ended up using //*[text()[contains(.,‘@’)]] after reviewing clickAndWait, click - Selenium IDE Commands Tutorial.

Since the email address is the only “@” on that page, it works.

If there is a better way to do it, I’m open to suggestions.

[ORIGINAL POST]
I’m stumped on something that, at first glance, seems like it would be straightforward.

I want to update the email addresses for my 1st degree LinkedIn connections. The csv file of my LinkedIn contact info is about 4 years old so a number of the emails will be out-of-date.

The contact info page is located at LinkedInProfileURL/detail/contact-info (clicking on the “contact info” link in the profile summary.)

Email is one of the options. I can’t figure out how to find the proper ID to extract the email. It seems to be a dynamic “emberNUMBER” ID (e.g. ember444).

Thanks!

https://ui.vision/docs/selenium-ide/click#changingid
also a lot of… Search results for 'dynamic id' - UI.Vision RPA Software Forum | Discuss RPA Automation, Selenium IDE and OCR API Text Recognition

I’m still having trouble getting this to work.

If I use:

//*[contains(@id, “ember”)]/div/section[4]/div

It will indeed pull the email address and add it to a csv file.

The issue I’m having now is that not all of the emails are in section 4; sometimes they are in section 3.

Here is the complete element:

div class=“pv-contact-info__ci-container”
a href=“mailto:EMAIL@ADDRESS” class=“pv-contact-info__contact-link t-14 t-black t-normal” target=“_blank” rel=“noopener noreferrer”
EMAIL@ADDRESS
/a
/div

(Sorry, I can’t figure out how to add code :grinning:)

hi,

I am also trying to do this. Were you able to scrape up your own level 1 connections ?

G

This was on of the first scripts I created, so it’s probably pretty choppy. I’m sure there are way to improve it and hopefully it will help you. :grinning:

Column 4 is the LinkedIn users handle.

{
“Name”: “LinkedIn-Verify-Email”,
“CreationDate”: “2021-8-12”,
“Commands”: [
{
“Command”: “store”,
“Target”: “true”,
“Value”: “!ErrorIgnore”,
“Description”: “”
},
{
“Command”: “csvRead”,
“Target”: “recruiter.csv”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “open”,
“Target”: “${!COL4}/detail/contact-info/”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “waitForPageToLoad”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “storeText”,
“Target”: “//a[text()[contains(.,’@’)]]”,
“Value”: “!csvLine”,
“Description”: “”
},
{
“Command”: “if_v2”,
“Target”: “${!LastCommandOK}”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “csvSave”,
“Target”: “scrape.csv”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “else”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “store”,
“Target”: “No”,
“Value”: “!csvLine”,
“Description”: “”
},
{
“Command”: “csvSave”,
“Target”: “scrape.csv”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “end”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “pause”,
“Target”: “2000”,
“Value”: “”,
“Description”: “”
}
]
}

hi
im new to this
where can i find a video that teach me how to use this tools getting the same results?
i’m trying to get emails from linkedin