您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Extracts and exports URLs, author names, and a summary from LinkedIn saved posts.
This UserScript enhances your LinkedIn "Saved Posts" page by adding controls to efficiently extract and export data from your saved content. It allows you to collect post URLs, author names, and a summary of each post, offering various output formats and scrolling options.
Comprehensive Data Extraction: Gathers Post URLs, Author Names, and a condensed Summary of each saved post.
Multiple Output Formats:
Flexible Scrolling Modes:
Data Sanitization: Automatically removes non-UTF-8 compatible control characters from extracted text (authors and summaries) to prevent encoding issues in exported files.
Lightweight & Non-Intrusive: Integrates directly into the LinkedIn page without heavy external dependencies.
Navigate to Saved Posts: Go to https://www.linkedin.com/my-items/saved-posts/ in your browser.
Locate Controls: Once the page loads, you should see a new control panel added to the sidebar on the right side of the page (typically within the section.artdeco-card element).
Select Output Format:
- "Clipboard (URLs only)": Best for quick copy-pasting of just the post links.
- "CSV (Author,URL,Summary)": Choose this to generate a spreadsheet-friendly file.
- "JSON Array": For developers or advanced users who need structured data.
- "Automatic (until end or 5 min)": This is the default and recommended for most cases to ensure all posts are captured. The script will keep scrolling and loading until it detects the end of the list or hits a 5-minute limit.
- "Manual (specify pages)": If you select this, an input field labeled "Number of Pages" will appear. Enter the approximate number of times you want the script to scroll down and load more content. Each "page" corresponds to one scroll and "Show more" button click attempt.
- The button text will change to "Extracting..." to indicate progress.
- Do not close the tab or navigate away while extraction is in progress, especially in "Automatic" mode, as it needs to interact with the live page.
- For "Clipboard" output, a browser alert will confirm how many URLs were copied. You can then paste them into any text editor.
- For "CSV" or "JSON Array" output, a new browser tab will open containing the generated data. This tab will prompt you to save the file or display the raw content.
Rate Limiting: Avoid excessive or rapid extractions. LinkedIn has rate limits, and aggressive scraping could lead to temporary restrictions or flags on your account. Use the "Automatic" mode as intended, allowing it to complete its process.
Page Structure Changes: LinkedIn's website structure may change over time. If the script stops working as expected, it's likely due to changes in LinkedIn's HTML selectors. The POST_ITEM_SELECTOR, POST_URN_DIV_SELECTOR, AUTHOR_NAME_SELECTOR, SHOW_MORE_BUTTON_SELECTOR, and SUMMARY_SELECTOR might need updating.
Error Handling: The script icludes basic error logging to the browser console (accessible via F12 > Console). If you encounter issues, check the console for warnings or errors.
Summary Cleaning: The script attempts to remove the "…show more" text and replace line breaks within the summary to make it more suitable for CSV and JSON formats. It also sanitizes control characters.
This UserScript was initially developed by Gemini and improved with assistance from @ProtoPioneer.