🌐

Chụp ảnh màn hình Website hàng loạt

Tự động truy cập và chụp ảnh full-page hàng trăm website từ danh sách URL có sẵn.

Web ⭐⭐ Intermediate ⏱️ 5 phút

😫 Vấn đề (The Pain Point)

Bạn là Marketer/Agency cần nghiên cứu đối thủ. Sếp đưa danh sách 100 website đối thủ và yêu cầu: “Chụp lại trang chủ của họ để phân tích”.

Cách làm thủ công:

  1. Mở trình duyệt.
  2. Gõ URL.
  3. Đợi load.
  4. Dùng extension chụp ảnh cuộn trang (Full Page Screenshot).
  5. Lưu file, đặt tên.
  6. Lặp lại 100 lần.

Cực kỳ mất thời gian và nhàm chán!

🚀 Giải pháp Agentic (The Solution)

Sử dụng một “Robot duyệt web” (Puppeteer) để tự động đi qua từng link và chụp ảnh lại.

Tính năng:

  • Full Page Capture: Chụp từ đầu đến chân website, tự động cuộn (scroll) để load hết ảnh.
  • Batch Processing: Đọc file urls.txt chứa 1000 link cũng chạy tốt.
  • Smart Waiting: Tự động đợi mạng load xong mới chụp (tránh chụp trang trắng).
  • High Resolution: Giả lập màn hình Desktop Full HD hoặc 4K.

Website Screenshot Output (Kết quả là folder chứa hàng trăm ảnh website)

🤖 Engineering Prompt (Copy & Paste)

Copy đoạn prompt này để tạo công cụ:

**Role:** Node.js Automation Developer

**Task:** Create a command-line tool to batch capture screenshots of websites using Puppeteer.

**Requirements:**
1.  **Tech Stack:** Node.js, `puppeteer` (headless Chrome).
2.  **Input:** A text file `urls.txt` containing a list of URLs (one per line).
3.  **Features:**
    *   **Batch Processing:** Iterate through the list of URLs.
    *   **Full Page Capture:** Option to capture the entire scrollable height of the page, or just the viewport.
    *   **Smart Waiting:** Wait for the network to be idle (`networkidle0`) to ensure images/styles load before capturing.
    *   **Naming:** Save images as `domain-timestamp.png` inside a `screenshots` folder.
    *   **Viewport:** Simulate a high-res desktop connection (e.g., 1920x1080).
4.  **Deliverables:**
    *   `screenshot_batch.js`: The automation script.
    *   `package.json`: Dependencies.
    *   `urls.txt`: Sample input file.
    *   `run.bat` (optional): To run `npm install && node screenshot_batch.js`.

**Context:** Used by agencies/marketers to capture landing pages of competitors for research or portfolio archival.

🧠 Giải mã Prompt (Anatomy)

  • Tech Stack: Tại sao chọn Node.js/Puppeteer thay vì Python/Selenium? Vì Puppeteer (do Google build) điều khiển Chrome mượt mà hơn và chụp ảnh Full Page (cuộn trang) tốt hơn rất nhiều.
  • Smart Waiting: networkidle0 là keyword quan trọng để robot biết khi nào web load xong hẳn (không còn request mạng nào trong 500ms) rồi mới chụp.

🛠️ Hướng dẫn sử dụng (Zero-Touch Guide)

  1. Copy Prompt ở trên và paste vào AI.
  2. Đợi AI tạo file. Bạn sẽ thấy file screenshot_batch.jspackage.json.
  3. Vào file urls.txt, dán danh sách link web bạn muốn chụp (mỗi dòng 1 link).
  4. Chạy file run.bat (AI sẽ tạo để chạy npm install).
  5. Ngồi chơi và xem folder screenshots tự động đầy lên!

Lưu ý: Cần cài đặt Node.js trên máy tính trước khi dùng workflow này.

Workflows liên quan

Khám phá danh mục khác

📬

Get Started with Agentic Working

Subscribe to receive updates from AgenticWorking.io

📖 Free eBook Guide 📦 7 Ready-to-use Scripts 🔔 Weekly Tips

No spam, unsubscribe anytime. Join 1,000+ subscribers.