Là một dự án tự động hoá, joeyism/linkedin_scraper đã đạt 4.7k sao trên GitHub, ngôn ngữ Python. A library that scrapes Linkedin for user data
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Person Profiles - Scrape comprehensive profile information
Basic info (name, headline, location, about)
Work experience with details
Education history
Skills and accomplishments
Company Pages - Extract company information
Company overview and details
Industry and size
Headquarters location
Company Posts - Scrape posts from company pages
Post content and text
Reactions, comments, reposts counts
Posted date and images
Job Listings - Scrape job postings
Job details and requirements
Company information
Application links
Async/Await - Modern async Python with Playwright
Type Safety - Full Pydantic models for all data
Progress Callbacks - Track scraping progress
Session Management - Reuse authenticated sessions
Installation
pip install linkedin-scraper
Install Playwright browsers:
playwright install chromium
Quick Start
Basic Usage
import asyncio
from linkedin_scraper import BrowserManager, PersonScraper
async def main():
# Initialize browser
async with BrowserManager(headless=False) as browser:
# Load authenticated session
await browser.load_session("session.json")
# Create scraper
scraper = PersonScraper(browser.page)
# Scrape a profile
person = await scraper.scrape("https://linkedin.com/in/williamhgates/")
# Access data
print(f"Name: {person.name}")
print(f"Headline: {person.headline}")
print(f"Location: {person.location}")
print(f"Experiences: {len(person.experiences)}")
print(f"Education: {len(person.educations)}")
asyncio.run(main())
Company Scraping
from linkedin_scraper import CompanyScraper
async def scrape_company():
async with BrowserManager(headless=False) as browser:
await browser.load_session("session.json")
scraper = CompanyScraper(browser.page)
company = await scraper.scrape("https://linkedin.com/company/microsoft/")
print(f"Company: {company.name}")
print(f"Industry: {company.industry}")
print(f"Size: {company.company_size}")
print(f"About: {company.about_us[:200]}...")
asyncio.run(scrape_company())
Job Scraping
from linkedin_scraper import JobSearchScraper
async def search_jobs():
async with BrowserManager(headless=False) as browser:
await browser.load_session("session.json")
scraper = JobSearchScraper(browser.page)
jobs = await scraper.search(
keywords="Python Developer",
location="San Francisco",
limit=10
)
for job in jobs:
print(f"{job.title} at {job.company}")
print(f"Location: {job.location}")
print(f"Link: {job.linkedin_url}")
print("---")
asyncio.run(search_jobs())
Company Posts Scraping
from linkedin_scraper import BrowserManager, CompanyPostsScraper
async def scrape_company_posts():
async with BrowserManager(headless=False) as browser:
await browser.load_session("session.json")
scraper = CompanyPostsScraper(browser.page)
posts = await scraper.scrape(
"https://linkedin.com/company/microsoft/",
limit=10
)
for post in posts:
print(f"Posted: {post.posted_date}")
print(f"Text: {post.text[:200]}...")
print(f"Reactions: {post.reactions_count}")
print(f"Comments: {post.comments_count}")
print(f"URL: {post.linkedin_url}")
print("---")
asyncio.run(scrape_company_posts())
Authentication
LinkedIn requires authentication. You need to create a session file first:
Option 1: Manual Login Script
from linkedin_scraper import BrowserManager, wait_for_manual_login
async def create_session():
async with BrowserManager(headless=False) as browser:
# Navigate to LinkedIn
await browser.page.goto("https://www.linkedin.com/login")
# Wait for manual login (opens browser)
print("Please log in to LinkedIn...")
await wait_for_manual_login(browser.page, timeout=300)
# Save session
await browser.save_session("session.json")
print("✓ Session saved!")
asyncio.run(create_session())
Option 2: Programmatic Login
from linkedin_scraper import BrowserManager, login_with_credentials
import os
async def login():
async with BrowserManager(headless=False) as browser:
# Login with credentials
await login_with_credentials(
browser.page,
username=os.getenv("LINKEDIN_EMAIL"),
password=os.getenv("LINKEDIN_PASSWORD")
)
# Save session for reuse
await browser.save_session("session.json")
asyncio.run(login())
Progress Tracking
Track scraping progress with callbacks:
from linkedin_scraper import ConsoleCallback, PersonScraper
async def scrape_with_progress():
callback = ConsoleCallback() # Prints progress to console
async with BrowserManager(headless=False) as browser:
await browser.load_session("session.json")
scraper = PersonScraper(browser.page, callback=callback)
person = await scraper.scrape("https://linkedin.com/in/williamhgates/")
asyncio.run(scrape_with_progress())
browser = BrowserManager(
headless=False, # Show browser window
slow_mo=100, # Slow down operations (ms)
viewport={"width": 1920, "height": 1080},
user_agent="Custom User Agent"
)
Error Handling
from linkedin_scraper import (
AuthenticationError,
RateLimitError,
ProfileNotFoundError
)
try:
person = await scraper.scrape(url)
except AuthenticationError:
print("Not logged in - session expired")
except RateLimitError:
print("Rate limited by LinkedIn")
except ProfileNotFoundError:
print("Profile not found or private")
Best Practices
Rate Limiting - Add delays between requests
import asyncio
await asyncio.sleep(2) # 2 second delay
Session Reuse - Save and reuse sessions to avoid frequent logins
Apache License 2.0 - see LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Disclaimer
This tool is for educational purposes only. Make sure to comply with LinkedIn's Terms of Service and use responsibly. The authors are not responsible for any misuse of this tool.
joeyism/linkedin_scraper thuộc nhóm Automation trên TopGit, cùng 12 topic GitHub. Trang Trending và Topics liệt kê các repo cùng số sao và cùng ngôn ngữ để so sánh.
Đọc thêm về joeyism/linkedin_scraper ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/joeyism/linkedin_scraper là nguồn chính thức.
joeyism/linkedin_scraper có phải mã nguồn mở không?
Có — joeyism/linkedin_scraper phát hành theo license GPL-3.0, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/joeyism/linkedin_scraper.
joeyism/linkedin_scraper là gì?
joeyism/linkedin_scraper (joeyism/linkedin_scraper) là dự án Python trên GitHub. Theo mô tả gốc: A library that scrapes Linkedin for user data
joeyism/linkedin_scraper so với các dự án Automation khác thế nào?
joeyism/linkedin_scraper được TopGit xếp vào nhóm Automation, với 4.7k sao GitHub và viết bằng Python. Xem trang chủ đề Automation trên TopGit để so sánh với các dự án tương tự theo số sao và mức độ hoạt động.
Vì sao joeyism/linkedin_scraper được xếp vào nhóm Automation?
TopGit xếp joeyism/linkedin_scraper vào nhóm Automation dựa trên GitHub topics và mô tả của repo (gắn thẻ: "chrome", "company", "driver"). Việc phân loại dựa trên metadata thật của repo, không phải đoán theo cảm tính biên tập.
Đọc đầy đủ README ở tab phía trên.
Chưa chắc linkedin_scraper có hợp với bạn?
Để ChatGPT, Claude hoặc Perplexity tìm hiểu giúp — bấm bên dưới và xem AI nói gì về linkedin_scraper.