amit-yadav/jarvis icon
public
Published on 6/20/2025
jarvi

Prompts
My prompt
A sample prompt
Build a Chrome extension or JavaScript automation that scrapes LinkedIn Sales Navigator profile data from the DOM. It should extract the following elements from the currently open profile in Sales Navigator:

1. Prospect Full Name from:
   <span data-anonymize="person-name">Georgie Rebane</span>

2. Job Title from:
   <span data-anonymize="title">Senior System Administrator</span>

3. Location from:
   <span class="t-12" data-anonymize="location">Seattle, Washington, United States</span>

4. Company Name and Sales Navigator Company Link from:
   <a data-anonymize="company-name" href="/sales/company/76976606?_ntb=...">Tebra</a>

5. Prospect Sales Navigator Profile Link:
   Use `window.location.href` to get the full Sales Navigator profile URL.

6. Prospect LinkedIn Public Profile Link:
   - Click on the button containing the following SVG (three dots menu):
     <svg aria-hidden="true" ...><path d="M3 9.5A1.5 1.5 0 114.5 8 ..."/></svg>
   - After clicking, extract the link to the public LinkedIn profile (e.g., linkedin.com/in/...).

7. Tenure in Company:
   - Go to the Experience section.
   - Extract the start date of the current position.
   - Calculate the number of months/years up to the current date.

Automation requirements:
- Store data in an array of objects.
- Allow exporting to CSV or push to Google Sheets via API.
- Automatically move to the next profile by simulating a click on the next profile card or paginated navigation.
- Add randomized delays (5–10 seconds) and scrolling behavior to mimic human activity.
- Limit total scrapes per day to 30–50 to avoid detection by LinkedIn.
- Include a popup UI in the extension with Start/Stop controls.
- Use content scripts for DOM interaction and background scripts for tab management.
- Manifest permissions required: "tabs", "activeTab", "scripting", "storage", "https://*.linkedin.com/*", "https://*.salesnavigator.linkedin.com/*".

The goal is to automate Sales Navigator scraping with stealth to avoid detection, export data efficiently, and cycle through multiple profiles.