Skip to content
June 30, 2025
  • Japanese
  • French
  • Russian
  • Spanish
  • Korean
  • Simplified Chinese
  • Twitter
  • Linkedin
  • Youtube
  • Pinterest
  • Facebook
  • TikTok
  • Instagram

EASY2DIGITAL

FIND WAYS TO SAVE TIME FROM YOUR LIFE

Primary Menu

EASY2DIGITAL

  • About
    • What They Say
    • Successful Cases
  • News
    • Technology
    • AI
    • NFT
    • Cryptocurrency
    • Health
  • Lifestyle
    • Smart Home
    • Smart Device
    • Electric Vehicle & Accessories
  • AGI
    • Prompt Engineering
    • AI Tools
      • AI Audio
      • AI Coding
      • AI Business Tools
      • AI Content Generator
      • AI Chatbot
      • AI Design
      • AI eCommerce
      • AI Image
      • AI Prompt
      • AI Product Image
      • AI Transcription
      • AI Video Generator
      • AI Voice Generator
    • OpenAI & ChatGPT
    • Generative AI
    • AI Risks
    • AI Chips
  • Automation
    • Python
    • Web & Mobile Application
    • React & Javascript
    • Email Scraper
    • Digital Advertising Automation
    • Google Bots
    • China Social Bot
    • Global Social Bot
    • Global eCommerce Bot
  • Investment
    • Smart Finance
  • Marketing
    • eCommerce
    • SaaS
    • Strategy
  • Web3.0
    • Token
    • Smart Contract
    • DApp
    • Crypto Wallet
  • Data Science
    • Pandas
    • Numpy
    • Scikit Learn
    • Matplotlib
    • NLP
    • Tensor Flow
  • API & Onsite App Shop
  • API Hub & Docs
  • Automation Gadget Grocery Store
  • Contact us
  • Home
  • Automation
  • Chapter 24: Linkedin Scraper & Bot, Automate Adding Connections and Messaging
  • Automation
  • data

Chapter 24: Linkedin Scraper & Bot, Automate Adding Connections and Messaging

May 2, 2024

Linkedin, which is the professional networking platform, recently announced that the China version of Linkedin will sunset later this year. It’s due to a significantly more challenging operating environment and greater compliance requirement. It will launch the global standalone platform called InJobs in China. But the platform will not include a social media feed or the ability to share posts or articles. It’s what it is. Linkedin business networking is still very valuable to users, no matter whether Chinese need to use VPN to login their profiles, or inJob still has the feature of people search.

1-on-1 communication is critical in B2B marketing, which is different from massive consumer market campaigns. After all, B2B deals before closing have more considerations than just buying a piece of iPhone case. Frankly, it doesn’t have many high-quality business network platforms globally. Before you have plenty of qualified 1st party data applied to emails, social media, and advertising, Linkedin must be one of the battlegrounds your B2B business line has to take up.

In this Python Tutorial, I would walk you through how to automate increasing specific target connections, and activate the automatic messaging. It’s for the purpose to start the conversation with your target business account. By the end of this Python Tutorial, you can master the basic rules of Linkedin connections and tips and tricks to use this bot and scraper. And most importantly, you can start automating instead of what you are repeatedly doing every day.

Table of Contents: Linkedin Scraper

  • Linkedin Connection Rules and Account Creation Tips
  • Keyword and People Search URL Parameters
  • Add Connection Automatically
  • Sending 1st Connection Messages Automatically
  • Full Python Script of Linkedin scraper and bot
  • LINKEDIN Latest Trending API Endpoint Recommendation

Linkedin Connection Rules and Account Creation Tips

Each Linkedin user can have at most 30k connections and unlimited followers. Apart from recruitment and job search purposes, people usually leverage the connection to build business networks and blast business-related messaging.

To any new user, she or he can go to search for a company or a name with or without some filters. Basically here is the place to add new connections and messaging to your 1st connections.

Messaging to 2nd connection and 3rd connections requires signing up for Linkedin premium plans. So in this chapter it mainly talks about how to automate messaging to 1st connections.

Personally, there are two tips and tricks. First, please sign up for a new account and put it as a dummy account instead of using your real personal account. It’s because Linkedin on and off investigates the robot account. It’s for avoiding your personal one that might be suspended.

Secondly, please add some friends with a certain amount of Linkedin connections before automating networking. It’s better to build connections with more than 5000. It’s because Linkedin doesn’t grant access to your profile and you can’t see the 2nd or 3rd connections button if your account hasn’t any connections.

People Search URL Parameters

Adding new connections is the first step of this Python bot script. Adding people from different companies is different from what company name or brand name keywords you input into the section.

For example, here is the URL for searching for people from Furbo which is a well-known brand of the pet camera devices. In the script, apart from the path, the keyword parameter can change for different results. You can add Furbo, tesla, Microsoft, etc. What’s more, you can go to the 2nd page, 3rd page, and more by changing the page parameter.

For specifically searching your 1st connection using keywords, you need to add one parameter “network=%5B%22F%22%5D” in the URL.

For example,

https://www.linkedin.com/search/results/people/?keywords=easy2digital&network=%5B%22F%22%5D&page=1

Add New Connections Automatically

First thing first, we need to find the connect button element and the path. Luckily, Linkedin assigns this button with the button element. It’s easy to write this line of code. But things you need to be aware of are the buttons with different messages. You don’t need to click all the buttons. So here are the codes that only click those buttons named in connect

all_buttons = driver.find_elements_by_tag_name("button")
connect_buttons = [btn for btn in all_buttons if btn.text == "Connect"]

Then, things are not just a one-click button. There are 3 steps broken down in this journey, which are “click, send and close”.

You might find that there are some blockers in the Linkedin scraping process. Basically, there are three types of blockers

– Blank elements
– Inactive elements
– Element not interactable exceptions

When adding new connections, you would come across sometimes the Javascript pop-up or snippets stopping your scraping. So for resolving this and making the scraping go smoothly, you need to add execute_script and arguments[0]. It is your way of accessing the first argument to the anonymous function.

Sending 1st Connection Messages Automatically

Regarding automatic messages, you must have a specific company or brand communication objective. So the keyword here should be the brand or company name in your 1st connections.

https://www.linkedin.com/search/results/people/?keywords=easy2digital&network=%5B%22F%22%5D&page=1

First things first, it’s different with adding new connections. Now you need to click the button named in the message

all_buttons = driver.find_elements_by_tag_name("button")
message_buttons = [btn for btn in all_buttons if btn.text == "Message"]

Then, creating a for loop is necessary as you would repeat to click and send the same messages. If you need to visit more than 1 page, you also need to create one more for loop above this level

for contacts in range(0,len(message_buttons))

driver.execute_script("arguments[0].click();", message_buttons[contacts])

One key step here is to add this XPath, because you have to click the message window before you type any messages. To activate this section and paragraph section, you need to add this script.

main_div = driver.find_element_by_xpath("//div[starts-with(@class, 'msg-form__msg-content-container')]")

Last but not least, you paste the message to the conversation window and box, and click the submit button and close button. Basically, one automatic messaging is done until here.

I would walk you through how to customize the name and opening in the next Python Tutorial chapter.

Full Python Script of Linkedin Scraper and Bot

If you would like to have the full version of the Python Script of Amazon Product Price Tracker, please subscribe to our newsletter by adding the message “Chapter 24”. We would send you the script immediately to your mailbox.

I hope you enjoy reading Chapter 24: Linkedin Scraper & Bot, Automate Adding Connections and Messaging. If you did, please support us by doing one of the things listed below, because it always helps out our channel.

  • Support and donate to our channel through PayPal (paypal.me/Easy2digital)
  • Subscribe to my channel and turn on the notification bell Easy2Digital Youtube channel.
  • Follow and like my page Easy2Digital Facebook page
  • Share the article on your social network with the hashtag #easy2digital
  • Buy products with Easy2Digital 10% OFF Discount code (Easy2DigitalNewBuyers2021)
  • You sign up for our weekly newsletter to receive Easy2Digital latest articles, videos, and discount codes
  • Subscribe to our monthly membership through Patreon to enjoy exclusive benefits (www.patreon.com/louisludigital)

FAQ:

Q1: What is Linkedin Profile Scraper?

A: Linkedin Profile Scraper is a tool that allows you to extract data from LinkedIn profiles.

Q2: How does Linkedin Profile Scraper work?

A: Linkedin Profile Scraper works by using web scraping techniques to extract information from LinkedIn profiles and save it in a structured format.

Q3: What data can be extracted using Linkedin Profile Scraper?

A: With Linkedin Profile Scraper, you can extract data such as name, job title, company, education, skills, and contact information from LinkedIn profiles.

Q4: Is Linkedin Profile Scraper legal?

A: The legality of using Linkedin Profile Scraper depends on how you use it. It is important to comply with LinkedIn’s terms of service and respect the privacy of individuals whose profiles you scrape.

Q5: Can I use Linkedin Profile Scraper to scrape multiple profiles at once?

A: Yes, Linkedin Profile Scraper allows you to scrape multiple profiles at once, saving you time and effort.

Q6: What formats can the scraped data be exported in?

A: The scraped data can be exported in various formats, including CSV, Excel, or JSON, depending on your preference.

Q7: Is Linkedin Profile Scraper compatible with all operating systems?

A: Yes, Linkedin Profile Scraper is compatible with Windows, Mac, and Linux operating systems.

Q8: Does Linkedin Profile Scraper require any programming knowledge?

A: No, Linkedin Profile Scraper is designed to be user-friendly and does not require any programming knowledge. It has a simple and intuitive interface.

Q9: Can I schedule automatic data extraction with Linkedin Profile Scraper?

A: Yes, Linkedin Profile Scraper allows you to schedule automatic data extraction, so you can set it to scrape profiles at specific intervals.

Q10: Is there customer support available for Linkedin Profile Scraper?

A: Yes, there is customer support available for Linkedin Profile Scraper. You can reach out to the support team for any assistance or inquiries.

Linkedin API Endpoint Recommendation

Linkedin User Profile Scraper API

Price: US$20

Linkedin profile scraper API faciliates you to search talents or potential prospect just inputting simple queries. Users just input the company name with title or position name to scrape profiles in mins at scale. The scraped results return the prospect name, position, Linkedin profile URL. Users can get the specific people’s contact if you subscribe the standard or pretisge plan

More API options from the Linkedin collection. 

SAVE UP TO 50% and EXPLORE MORE!

Tags: Global Social Bot Collection, linkedin, Python for Digital Marketers

Continue Reading

Previous Chapter 32: ContactOut Bot for Scraping Emails and Linkedin Profiles
Next Chapter 16 – Amazon Product Scraper Using Selenium, BeautifulSoup, and Easy2Digital APIs

More Stories

  • Automation
  • data
  • Data Science

Chapter 76 – Generate the Object Feature Importance Using Scikit learn and Random Forest

August 23, 2024
  • Automation
  • data

Chapter 86 – Tips to Create AMP Pages for Web App using Python, HTML, CSS, JS

May 12, 2024
  • Automation
  • data

Chapter 87 – Interact with Google Big Query ML Pre-trained Model Dataset Using Python

May 12, 2024
  1. romeorandle on Chapter 40 – Utilize Youtube Bots to Scrape Videos, Profiles, and Contacts Using Easy2Digital APIs and Youtube APIApril 3, 2023

    Useful info. Fortunate me I found your site by accident, and I am stunned why this accident didn't came about…

  2. yoshka on Chapter 72 – Build a Blog Content Generator Using OpenAI GPT3 and Easy2Digital APIMarch 26, 2023

    Thank you ever so for you blog. Really looking forward to read more.

  3. Haydengret on Chapter 40 – Utilize Youtube Bots to Scrape Videos, Profiles, and Contacts Using Easy2Digital APIs and Youtube APIMarch 22, 2023

    When some one searches for his necessary thing, therefore he/she needs to be available that in detail, thus that thing…

  4. dennylone on Chapter 40 – Utilize Youtube Bots to Scrape Videos, Profiles, and Contacts Using Easy2Digital APIs and Youtube APIMarch 21, 2023

    Your mode of telling the whole thing in this article is in fact fastidious, all be able to easily be…

  5. sil on Chapter 29 – Build an Indiegogo Bot for Scraping Most Crowdfunded ProjectsMarch 19, 2023

    Pls send me Python Tutorial 29 – Create an Indiegogo Bot for Scraping Most Crowdfunded Projects, thank u ~

Tags

AI Audio AI Chatbot AI Coding AI Content Generator AI Design AI Image AI Product Image AI Prompt AI Transcription Tool AI Video Generator amazon Baidu CBD CRM Crypto Wallet Data Science Digital Advertising Automation DJI e-Commerce Email Scraper Facebook Global eCommerce Bot Collection Global Social Bot Collection Google Google Bots google sheets google shopping Google vs Amazon Collection instagram Investment lazada Marketing Numpy Pandas Python for Digital Marketers Scikit Learn SEO Shopify Smart Contract Subscription-Business TikTok Twitter Web & Mobile Application WeChat youtube

Follow Us

  • Twitter
  • Linkedin
  • Youtube
  • Pinterest
  • Facebook
  • TikTok
  • Instagram

Product & Partnership

  • APIs & AI Apps Shop
  • Influencer Partnership Program

About

  • About Us
  • Contact Us
  • Privacy & Terms
  • Terms & Conditions
  • Library
  • About Us
  • Contact Us
  • Privacy & Terms
  • Terms & Conditions
  • Library
  • Twitter
  • Linkedin
  • Youtube
  • Pinterest
  • Facebook
  • TikTok
  • Instagram
Copyright © All rights reserved by EASY2DIGITAL.
Go to mobile version