1.7 KiB
1.7 KiB
name, description
| name | description |
|---|---|
| llm-iterative-scrape | Iterative compliant scraping workflow: plan -> bounded browser step -> evaluate -> refine until goal satisfied or safety/budget stops. |
llm-iterative-scrape
Use this skill for iterative, goal-driven scraping on authorized public or user-owned sites.
Loop:
- Translate the natural-language goal into a minimal set of CSS selectors and a short plan for ONE bounded browser step.
- Execute exactly one small browser step with a polite wait/rate limit via the host agent's primitives.
- Evaluate observations vs. the goal. Refine minimally. Stop when satisfied or when any safety/budget condition triggers.
Hard safety constraints:
- Never solve or route around CAPTCHAs/anti-bot.
- Never log in or pass paywalls.
- Restrict pagination to same-origin as the start URL by default; also respect provided allowed_domains.
- When
respect_robotsis true, treat any robots.txt disallow or failure-to-check as a stop condition.
Selectors guidance:
- Use compact CSS selectors. Suffix conventions:
::text,::html,::attr(name). - Use one pagination field:
pagination_nextornextfor the next-pagehref. - Prefer domain-agnostic patterns like
a[rel='next']::attr(href)orli.next a::attr(href).
Planning output contract: Return strictly compact JSON only: {"plan_summary": str, "selectors": {str:str}, "continue": bool, "notes": str}. Keep under ~600 chars when possible.
Evaluation guidance:
- If extracted data matches the requested fields and count threshold, set continue=false and summarize.
- If pagination is needed for more pages and a next link exists, keep continue=true.
- On any safety trigger (captcha/login/paywall/robots), set continue=false and summarize the stop reason.