puppeteer/examples
Use case-driven examples for using Puppeteer and headless chrome
Thành tựu nổi bật
Những danh hiệu mới nhất của dự án
#1 Repository của tháng
#1 Repository của tháng
#1 Repository của tháng
🧪 Ví dụ thực chiến với Puppeteer và Chrome headless
Từ kiểm tra SEO đến mở trò chơi, hàng chục demo thực tế cho thấy Puppeteer có thể làm gì.
Dự án puppeteer/examples là kho tập hợp hơn 15 ví dụ mã nguồn mở minh họa cách dùng Puppeteer — thư viện Node.js điều khiển Chrome/Chromium headless — để giải quyết các tác vụ thực tế như kiểm thử, thu thập dữ liệu, tối ưu hiệu năng và tương tác với trang web.
Mỗi file .js trong thư mục này là một use case cụ thể, kèm hình ảnh minh họa kết quả thực thi.
✨ Điểm nổi bật
- code_coverage.js: Đo lường CSS/JS thực sự được sử dụng khi tải trang để tối ưu bundle.
- verify_sw_caching.js: Kiểm tra service worker đã cache đúng tài nguyên cho offline chưa.
- google_search_features.js: Kiểm tra trang có render đúng cho Google Search chưa.
- lazyimages_without_scroll_events.js: Đảm bảo ảnh lazy-load hiển thị đúng cho Google.
- element-to-pdf.js: Chuyển một phần tử DOM thành file PDF.
- crawlsite.js: Dò tìm toàn bộ URL trên một trang hoặc SPA.
- side-by-side-pageload.js: So sánh thời gian tải trang giữa nhiều phiên bản.
- speech.js & pacman.js: Trình diễn khả năng tương tác phức tạp với trình duyệt.
💡 Vì sao đáng chú ý
Không chỉ là tài liệu hướng dẫn, đây là danh sách các ví dụ có thể chạy ngay để học hoặc tù biến. Phù hợp cho team cần nhanh tay áp dụng Puppeteer vào workflow kiểm thử, giám sát SEO, hoặc tự động hóa thu thập dữ liệu mà không cần viết lại từ đầu.
#Puppeteer #ChromeHeadless #WebAutomation #BrowserTesting #NodeJS #TiniX
Dự án tương tự
Khám phá các dự án và mô hình AI khác có sự tương đồng.
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.
Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Give your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Reverse engineer anything with agents, from app behavior down to native binaries.
Python tool for converting files and office documents to Markdown.
🙃 A delightful, community-driven framework for managing your zsh configuration. Built by 2,600+ contributors, with hundreds of plugins (git, rails, laravel, node, python, docker, kubectl, aws, and more), themes to spice up your terminal, and automatic updates to keep your command line feeling like home.