Skip to main content

A Python library to automate various operations on LinkedIn posts, comments, and replies.

Project description

🤖 Linkedin Automator

A Python library to automate various operations on LinkedIn posts, comments, and replies. So far, it supports the following features:

  • Viewing all comments on posts (as well as last two replies) for each comment

  • Deleting a comment or more given their links

  • Deleting comments written by specific users across a number of posts

The last feature has been our main motivation for making this package since LinkedIn does not allow pages to block users from commenting on their posts.

🚀 Installation


pip install linkedin-automator

📒 Guide

Set in you .env:


LINKEDIN_EMAIL=...

LINKEDIN_PASSWORD=...

LINKEDIN_ACCESS_TOKEN=...

LINKEDIN_ACTOR_URN=...

To understand how to get these fields, see setup.md

Import the package and instantiate

from linkedin_automator import LinkedInAutomator



auto = LinkedInAutomator()

👀 Viewing comments and replies on a post

# Get comments on a post

comments_info = auto.get_comments('https://www.linkedin.com/feed/update/...')

🗑️ Deleting comment(s) given a link or more

# Delete comment given link

auto.purge_comment_given_link('https://www.linkedin.com/feed/update/...')

# Delete multiple comments

comment_links = [

    'https://www.linkedin.com/feed/update/...',

    'https://www.linkedin.com/feed/update/...'

]

auto.purge_comments_given_links(comment_links)

🔥 Deleting comments written by specific profile ids across a number of posts.

profile_ids = ['abc-def-1999', 'ggref-please']

post_urls = [

             'https://www.linkedin.com/feed/update/...', 

             'https://www.linkedin.com/feed/update/...'

             ]

auto.purge_comments(post_urls, profile_ids)

📃Getting recent K posts by a company

To understand how to get the company public_id, read this.

auto.get_recent_posts(public_id='12345678', max_results=5)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

linkedin_automator-0.3.0.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

linkedin_automator-0.3.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file linkedin_automator-0.3.0.tar.gz.

File metadata

  • Download URL: linkedin_automator-0.3.0.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.1

File hashes

Hashes for linkedin_automator-0.3.0.tar.gz
Algorithm Hash digest
SHA256 2e8e51d564a4f0610c653032eb9516aac6a81d62b8638a0aba6f5dd384ca76bf
MD5 b0922aa399c5e591cb22441deb88bd6c
BLAKE2b-256 5a3fe8647eff328916613e09e0b218986b1be1c47338ac9a71991aad56c12ad5

See more details on using hashes here.

File details

Details for the file linkedin_automator-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for linkedin_automator-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ef581cce983aa5d0e0821296b5aad5df6ead9453b7484f02d82e35ae2d4d7373
MD5 affd601c3f39e3f6833397e67fe0f7c1
BLAKE2b-256 3fcff2db71fe8905c5d59e75441e5e25a622d5b5b6eba5af7a2b818adc048e34

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page