stream-crawler
Use Playwright to capture URLs that are easily missed by normal fetching, such as infinite scroll, lazy loading, virtual lists, and SPA listings. Use this when you want to save URL content and page-streaming is insufficient.
Works with
--- name: stream-crawler description: Use Playwright to capture URLs that are easily missed by normal fetching, such as infinite scroll, lazy loading, virtual lists, and SPA listings. Use this when you want to save URL content and page-streaming is insufficient. license: MIT --- This skill is designed to execute dynamic page fetching following a set procedure. When a target URL is received, first check the execution environment, perform setup if necessary, and then run the existing script. After fetching, check the generated files in the specified output directory (e.g., `<output_directory>`), and concisely report to the user how much was captured, and what happened if there were failures or missing data. ## When to Use - When capturing dynamic pages is necessary - When you want to save the contents of list pages or SPAs ## Execution Environment **Note:** All paths and operations described in this document assume that your current working directory is the skill directory (the directory containing this `SKILL.md` file), denoted as `<skill_directory>`. For the first time, prepare Python and Playwright. ```bash cd <skill_directory> python3 --version python3 -m venv .venv source .venv/bin/activate pip install . playwright install chromium ``` Afterwards, activate the virtual environment to execute. ```bash cd <skill_directory> source .venv/bin/activate ``` ## Execution Procedure Normal fetch: ```bash python scripts/stream_crawler.py \ --url "https://example.com/list" \ --session-dir "<output_directory>/example" ``` Bulk fetch (multiple URLs reusing browser context): ```bash cat << 'EOF' > urls.txt https://example.com/list1 https://example.com/list2 EOF python scripts/stream_crawler.py \ --urls urls.txt \ --session-dir "<output_directory>/bulk" \ --quiet-errors ``` Fast fetch (only fetch page 1 without scrolling, wait for OGP image): ```bash python scripts/stream_crawler.py \ --url "https://example.com/target" \ --session-dir "<output_directory>/example" \ --fast \ --wait-selector 'meta[property="og:image"]' ``` Outputs to check: - `<output_directory>/example/curl.html` - `<output_directory>/example/page_type.json` - `<output_directory>/example/pages/page_000N.json` - `<output_directory>/example/logs/crawler.log` ## How to Read the Outputs ### `page_type.json` - Concisely summarizes the page type determination of the target URL. - Look here first when you want a rough overview of the entire page. - Refer to [`references/json-format.md`](references/json-format.md) for detailed JSON items. ### `curl.html` - Initial HTML fetched with `curl`. - Use this when you want to check how much content was included before JavaScript execution. ### `page_000N.json` - Summary information of each snapshot. - Use this to get a rough overview of the whole process, track at what point content increased, and find the next file to look at. - Refer to [`references/json-format.md`](references/json-format.md) for detailed JSON items. ### `page_000N.html` - The HTML of the main content at that time. - Use this when you want to extract information using XPath or CSS selectors based on the HTML structure. ### `page_000N.txt` - The full text of the body at that time. - Use this for text search, keyword checking, or when you want to quickly read through the entire text. ### `crawler.log` - Logs of the scrolls executed and termination reasons. - Use this when you want to check where growth occurred, where it stopped, or the reason for a fetch failure. ## Rules - Prioritize using the script. - Do not supplement content that could not be fetched. - Report errors as failures. - Guide to related documents if an explanation of the implementation specifications is needed. ## References - [`README.md`](README.md) - [`docs/spec.md`](docs/spec.md) - [`references/json-format.md`](references/json-format.md)
More Testing skills
tdd
mattpocock/skills
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
setup-pre-commit
mattpocock/skills
Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.
agent-browser
vercel-labs/agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.

