feat: add LinkedIn as a fifth platform - #3
Open
nicogiesen wants to merge 1 commit into
Open
nicogiesen wants to merge 1 commit into
nicogiesen wants to merge 1 commit into
Conversation
ScrapeCreators ships LinkedIn endpoints (person profile incl. recentPosts, post details with engagement + comments, post transcript), so LinkedIn slots into the existing per-platform fetcher architecture: - lib/linkedin.py: fetch_profile chains profile -> per-post enrichment (recentPosts carry no date/engagement; capped at 8 lookups per profile), fetch_post, fetch_comments (from the post response), fetch_transcript - registries: linkedin registered in all four fetcher maps - urls: linkedin.com detection + handle extraction (/in/<h>, /posts/<h>_...) - scoring: likes + 3*comments + 2*reposts - dates: parse_iso_date for LinkedIn's ISO 8601 datePublished - tests: 12 new cases (fetcher chain, enrichment fallback, urls, scoring), fixtures from the documented API response shapes - README/SKILL.md: five platforms + credit-cost note for profile fetches Verified against the live API: profile chain returns real posts with dates and engagement.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds LinkedIn as a fifth platform, using the ScrapeCreators LinkedIn endpoints that already ship with the same API key.
Why
LinkedIn is the primary channel for a lot of B2B founders and consultants running this skill — and ScrapeCreators already exposes everything needed (person profile incl.
recentPosts, post details with engagement + comments, post transcript). The FILE-SCHEMAS even namelinkedin.mdas an example, so the data model was ready for it.How
The one quirk:
/v1/linkedin/profilereturnsrecentPostswithout dates or engagement.fetch_profiletherefore chains a/v1/linkedin/postlookup per recent post (capped at 8, so a profile fetch costs at most 1 + 8 credits). Posts whose enrichment fails are kept with preview text and empty engagement instead of being dropped. This cost behavior is documented in the README next to the existing X quirk.lib/linkedin.py—fetch_profile(profile → per-post enrichment chain),fetch_post,fetch_comments(from the post response),fetch_transcriptlib/platforms.py— linkedin registered in all four registrieslib/urls.py—linkedin.comdetection + handle extraction (/in/<handle>,/posts/<handle>_…)lib/scoring.py—likes + 3*comments + 2*repostslib/dates.py—parse_iso_datefor LinkedIn's ISO 8601datePublishedTesting