Skip to content

feat(linkedin): export profile activity posts#1724

Closed
gauravsaxena1997 wants to merge 1 commit into
jackwener:mainfrom
gauravsaxena1997:codex/linkedin-posts-export
Closed

feat(linkedin): export profile activity posts#1724
gauravsaxena1997 wants to merge 1 commit into
jackwener:mainfrom
gauravsaxena1997:codex/linkedin-posts-export

Conversation

@gauravsaxena1997
Copy link
Copy Markdown
Contributor

What and why

LinkedIn profile activity posts are useful for career and content workflows, but OpenCLI does not currently provide a read-only way to export the visible post body and counters from an authenticated profile activity page.

This PR adds a raw posts export command. It intentionally avoids custom scoring or classification and returns only data visible in the LinkedIn browser session.

What this PR does

Adds a Strategy.COOKIE LinkedIn browser adapter:

opencli linkedin posts --limit 1 -f json

Implementation details:

  • Adds shared LinkedIn helpers for auth-wall checks, safe URL validation, limit parsing, text normalization, and evaluate-result unwrapping
  • Adds posts-core.js for DOM extraction helpers without registering an extra command
  • Extracts visible post author, posted age, expanded body text, reactions, comments, reposts, impressions when LinkedIn exposes them, media labels, media URLs when non-decorative media URLs are visible, post URL when LinkedIn exposes it, and raw card text
  • Filters out decorative/profile/reaction image URLs so media_urls does not incorrectly return avatar or reaction CDN assets
  • Supports --limit from 1 to 100

Live verification

Verified against a logged-in LinkedIn profile session:

opencli linkedin posts --limit 1 -f json

Returned the latest visible post with author, full body, reaction count, comment count, repost count, visible impressions, media label, and raw card text. On that card LinkedIn exposed a media label but not a real post-media URL, so media_urls correctly returned an empty string instead of a profile-photo URL.

Checklist

  • npm run build
  • npx vitest run --project adapter clis/linkedin/posts.test.js
  • npm run typecheck
  • node scripts/check-typed-error-lint.mjs
  • node scripts/check-silent-column-drop.mjs

@gauravsaxena1997 gauravsaxena1997 changed the title feat(linkedin): add raw posts export feat(linkedin): export profile activity posts May 22, 2026
@gauravsaxena1997 gauravsaxena1997 force-pushed the codex/linkedin-posts-export branch from 304b31d to 85cd28a Compare May 22, 2026 20:41
jackwener added a commit that referenced this pull request May 23, 2026
Consolidates PRs #1722, #1723, #1724, #1725, #1726, and #1727 after B-group lead+aux review.\n\nReviewed-by: codex-mini1\nReviewed-by: First-principles-1
@jackwener
Copy link
Copy Markdown
Owner

Closed as superseded by consolidated PR #1731, merged as b6965a5.

@jackwener
Copy link
Copy Markdown
Owner

Superseded by consolidated PR #1731 (merged as b6965a5).

@jackwener jackwener closed this May 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants