<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Vatsal Desai</title>
    <description>The latest articles on DEV Community by Vatsal Desai (@dvatsal).</description>
    <link>https://dev.to/dvatsal</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4285898%2Fd229a6d7-2087-4cc3-b4e3-609a185bdbf0.jpg</url>
      <title>DEV Community: Vatsal Desai</title>
      <link>https://dev.to/dvatsal</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dvatsal"/>
    <language>en</language>
    <item>
      <title>Why I Open-Sourced My LinkedIn Saved Posts Exporter</title>
      <dc:creator>Vatsal Desai</dc:creator>
      <pubDate>Sun, 06 Dec 2026 06:39:33 +0000</pubDate>
      <link>https://dev.to/dvatsal/why-i-open-sourced-my-linkedin-saved-posts-exporter-1kpi</link>
      <guid>https://dev.to/dvatsal/why-i-open-sourced-my-linkedin-saved-posts-exporter-1kpi</guid>
      <description>&lt;p&gt;If you spend enough time on LinkedIn, your &lt;strong&gt;Saved Posts&lt;/strong&gt; tab quietly turns into a second brain.&lt;/p&gt;

&lt;p&gt;Over the last few years, mine accumulated thousands of bookmarks: MLOps architecture breakdowns, paper summaries, SQL tricks, LLM evaluation threads, and hard-won engineering postmortems. As a Data Scientist, that collection is gold—it is a curated dataset of signal filtered from years of noise.&lt;/p&gt;

&lt;p&gt;There was just one problem: &lt;strong&gt;you can’t actually query it, search it properly, or own it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;LinkedIn’s Saved Posts page (&lt;code&gt;/my-items/saved-posts/&lt;/code&gt;) is built as an infinite-scroll feed. You can’t run full-text search across your bookmarks, export them to Markdown or CSV, cluster them by topic, or feed them into a local RAG pipeline. Worse, if you try to scroll through several thousand saved posts in one sitting, Chrome eventually runs out of memory and greets you with the dreaded &lt;strong&gt;"Aw, Snap!"&lt;/strong&gt; crash.&lt;/p&gt;

&lt;p&gt;I have a simple rule for tools like this: &lt;strong&gt;if the data matters to my workflow, I want it on my own disk, in a structured schema I control.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;So I built &lt;strong&gt;LinkedIn Saved Posts Exporter (v4.2)&lt;/strong&gt;—and today, I’m open-sourcing it under the MIT License:&lt;br&gt;
&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/vatsaldin/linkedin_saved_posts" rel="noopener noreferrer"&gt;https://github.com/vatsaldin/linkedin_saved_posts&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Why This Needed Real Engineering (Not Just a 20-Line Console Script)
&lt;/h2&gt;

&lt;p&gt;On the surface, scraping your own saved posts sounds trivial: open DevTools, query &lt;code&gt;ul[role="list"] &amp;gt; li&lt;/code&gt;, grab the text, and dump JSON.&lt;/p&gt;

&lt;p&gt;That works for 30 posts. It completely breaks at 3,000+ posts.&lt;/p&gt;

&lt;p&gt;Building something reliable enough to archive thousands of posts forced me to solve four classic systems problems:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Expanding &lt;code&gt;"See more"&lt;/code&gt; Without Triggering an Infinite Loop
&lt;/h3&gt;

&lt;p&gt;Many LinkedIn posts are truncated behind a &lt;code&gt;...see more&lt;/code&gt; / &lt;code&gt;View more&lt;/code&gt; button. If you naively call &lt;code&gt;scrollIntoView()&lt;/code&gt; before clicking each expand button, you trigger LinkedIn’s infinite-scroll loader—which appends &lt;em&gt;more&lt;/em&gt; posts to the DOM while you are still trying to expand the current ones.&lt;/p&gt;

&lt;p&gt;In &lt;code&gt;linkedinSavedPostsExtractor.js&lt;/code&gt;, expansion explicitly calls &lt;code&gt;.click()&lt;/code&gt; directly without scrolling into view, running up to 20 re-query passes to catch dynamically revealed buttons before moving to extraction.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Surviving Chrome’s &lt;code&gt;"Aw, Snap!"&lt;/code&gt; Memory Crash
&lt;/h3&gt;

&lt;p&gt;In early autoscroll runs, I reached &lt;strong&gt;3,447&lt;/strong&gt; posts, and later &lt;strong&gt;6,701&lt;/strong&gt; posts before the browser tab crashed from unbounded DOM growth. LinkedIn keeps previously rendered list items alive in the DOM as you scroll downward.&lt;/p&gt;

&lt;p&gt;To solve this, I added:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Playwright + Chrome DevTools Protocol (&lt;code&gt;Performance.enable&lt;/code&gt;) memory profiling&lt;/strong&gt; (&lt;code&gt;playwright_tests/tests/profile_memory.spec.ts&lt;/code&gt;) to observe memory behavior during continuous scrolling.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Periodic DOM pruning&lt;/strong&gt; (&lt;code&gt;cleanupDOM&lt;/code&gt; in &lt;code&gt;extraction.js&lt;/code&gt; / &lt;code&gt;content.js&lt;/code&gt;), removing processed post nodes from the top of the list once the DOM exceeds a threshold while preserving extraction progress.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Floating in-page controls&lt;/strong&gt; (&lt;code&gt;Pause&lt;/code&gt;, &lt;code&gt;Resume&lt;/code&gt;, &lt;code&gt;Stop&lt;/code&gt;, live post counters, and a memory indicator) injected right onto the page.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Outgrowing &lt;code&gt;chrome.storage&lt;/code&gt; → IndexedDB with Chunked Commits
&lt;/h3&gt;

&lt;p&gt;Early versions hit browser storage limits and risked losing progress mid-run. In &lt;code&gt;v4.0.0&lt;/code&gt;, I moved browser caching to &lt;strong&gt;IndexedDB&lt;/strong&gt; (&lt;code&gt;LinkedInPostsDB&lt;/code&gt; in &lt;code&gt;db.js&lt;/code&gt;), complete with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deterministic string IDs/hashes for deduplication across runs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chunked batch commits&lt;/strong&gt; (&lt;code&gt;CHUNK_SIZE = 100&lt;/code&gt;) so a browser crash doesn’t wipe out an entire session&lt;/li&gt;
&lt;li&gt;Service worker coordination and auto-resume support in &lt;code&gt;background.js&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Persisting Straight to SQLite + FTS5 (Optional Local Backend)
&lt;/h3&gt;

&lt;p&gt;When you are archiving thousands of posts—or want to analyze them offline—streaming directly to disk beats holding everything in the browser.&lt;/p&gt;

&lt;p&gt;So in &lt;code&gt;v4.1.0&lt;/code&gt;–&lt;code&gt;v4.2&lt;/code&gt;, I added a lightweight &lt;strong&gt;Node.js + Express + SQLite&lt;/strong&gt; backend (&lt;code&gt;backend/server.js&lt;/code&gt;, running locally on &lt;code&gt;http://localhost:3000&lt;/code&gt;) with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A normalized schema: &lt;code&gt;authors&lt;/code&gt;, &lt;code&gt;posts&lt;/code&gt; (deduplicated by unique &lt;code&gt;urn&lt;/code&gt;), &lt;code&gt;post_links&lt;/code&gt;, &lt;code&gt;raw_html_posts&lt;/code&gt;, and extension diagnostic &lt;code&gt;logs&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SQLite FTS5 (&lt;code&gt;posts_fts&lt;/code&gt;)&lt;/strong&gt; kept in sync via &lt;code&gt;INSERT&lt;/code&gt; / &lt;code&gt;UPDATE&lt;/code&gt; / &lt;code&gt;DELETE&lt;/code&gt; triggers for instant full-text search across post text, author names, and hashtags&lt;/li&gt;
&lt;li&gt;A built-in local web viewer at &lt;code&gt;http://localhost:3000/viewer&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;One-click exports to &lt;strong&gt;JSON&lt;/strong&gt;, &lt;strong&gt;CSV&lt;/strong&gt;, and &lt;strong&gt;Markdown&lt;/strong&gt; directly from the extension popup&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  From Reliable Extraction to an Actionable Dataset
&lt;/h2&gt;

&lt;p&gt;The design philosophy is straightforward: &lt;strong&gt;respect state, failure modes, and clean boundaries&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Don’t trust long-running browser tabs without checkpoints.&lt;/li&gt;
&lt;li&gt;Separate extraction (&lt;code&gt;extraction.js&lt;/code&gt;), background persistence (&lt;code&gt;background.js&lt;/code&gt; / &lt;code&gt;db.js&lt;/code&gt;), and durable storage (&lt;code&gt;backend/server.js&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Keep your data local-first—no third-party cloud server ever needs your LinkedIn session or saved feed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once your saved posts sit in &lt;code&gt;backend/linkedin_posts.db&lt;/code&gt; or a clean JSON/Markdown export, they stop being dead bookmarks and become an actual dataset ready for downstream workflows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Instant FTS5 keyword search&lt;/strong&gt; across years of saved posts&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Topic clustering &amp;amp; trend analysis&lt;/strong&gt; on what you’ve been saving over time&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local RAG / semantic search&lt;/strong&gt; by embedding &lt;code&gt;raw_text&lt;/code&gt;, &lt;code&gt;hashtags_json&lt;/code&gt;, and extracted links into your favorite vector store&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Personal knowledge base ingestion&lt;/strong&gt; (e.g., importing the Markdown export into Obsidian or Notion)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Quick Start
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Clone the repo:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   git clone https://github.com/vatsaldin/linkedin_saved_posts.git
   &lt;span class="nb"&gt;cd&lt;/span&gt; linkedin_saved_posts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Open &lt;code&gt;chrome://extensions/&lt;/code&gt;, enable &lt;strong&gt;Developer mode&lt;/strong&gt;, and click &lt;strong&gt;Load unpacked&lt;/strong&gt; on the repo folder.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;(Recommended for large lists)&lt;/em&gt; Start the local SQLite backend:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   &lt;span class="nb"&gt;cd&lt;/span&gt; backend
   npm install
   npm start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Navigate to &lt;code&gt;https://www.linkedin.com/my-items/saved-posts/&lt;/code&gt;, click the extension icon, and extract or export as &lt;strong&gt;JSON&lt;/strong&gt;, &lt;strong&gt;CSV&lt;/strong&gt;, or &lt;strong&gt;Markdown&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Released As-Is — Fork It and Make It Yours
&lt;/h2&gt;

&lt;p&gt;I built this tool to solve my own problem, cleaned up the repository, and am sharing it under the MIT License in case it helps other engineers and data practitioners reclaim their own saved posts.&lt;/p&gt;

&lt;p&gt;To be transparent upfront: &lt;strong&gt;I am releasing this repository as-is and won’t be actively maintaining it or accepting issues and pull requests.&lt;/strong&gt; Because LinkedIn periodically updates its DOM classes, selectors may need occasional tweaks over time. If you want to adapt it to your own setup, update a selector, or build a RAG/analytics pipeline on top of it, please &lt;strong&gt;fork the repo&lt;/strong&gt; and make it your own.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Repo:&lt;/strong&gt; &lt;a href="https://github.com/vatsaldin/linkedin_saved_posts" rel="noopener noreferrer"&gt;https://github.com/vatsaldin/linkedin_saved_posts&lt;/a&gt; (MIT License)&lt;/p&gt;

</description>
      <category>ai</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
