Skip to content

pdaxt/linkedin-opera-control

Repository files navigation

LinkedIn Opera Control

Lightweight library to control LinkedIn on Opera browser via Chrome DevTools Protocol (CDP).

No Puppeteer bloat. No Playwright overhead. Just direct CDP over WebSocket.

Why?

Connects to your existing Opera session where you're already logged in. Built for LinkedIn automation:

  • Read feed posts
  • Like posts
  • Post comments
  • Create new posts
  • Multi-account support (personal + company page)

Requirements

  • Opera browser running with remote debugging enabled
  • Node.js 18+

Enable Remote Debugging in Opera

/Applications/Opera.app/Contents/MacOS/Opera --remote-debugging-port=9222

Installation

git clone https://github.com/pdaxt/linkedin-opera-control.git
cd linkedin-opera-control
npm install

CLI Usage

# List posts from feed
node cli.js posts 10

# List my recent posts
node cli.js myposts 5

# Take screenshot
node cli.js screenshot /tmp/screenshot.png

# Navigate to feed
node cli.js feed

# Like a post (by index)
node cli.js like 0

# Comment on a post
node cli.js comment 0 "Great insight!"

# Compose a new post
node cli.js compose "Your post text here"

# Submit the composed post
node cli.js submit

Library Usage

import { LinkedInController } from 'linkedin-opera-control';

const controller = new LinkedInController();

async function main() {
    await controller.connect();

    // Get feed posts
    const posts = await controller.getFeedPosts(10);
    console.log(posts);

    // Like first post
    await controller.likePost(0);

    // Comment on a post
    await controller.replyToPost("Great insight!", 0);

    // Create a new post
    await controller.createPost("My new post");
    await controller.submitPost();

    controller.disconnect();
}

main();

Multi-Account Support

// Switch between personal and company accounts
controller.switchAccount('personal');  // Your personal profile
controller.switchAccount('bskiller');  // BSKiller company page

Intelligence Layer

Built-in SQLite database for tracking engagements:

# View stats
node scripts/engage.js stats

# View person history
node scripts/engage.js history "@someone"

License

MIT

Author

BSKiller - bskiller.com

About

Lightweight library to control LinkedIn on Opera browser via CDP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •