Scrapling Skill
Use Scrapling CLI as default. Start with the smallest working command, validate the saved output, escalate only when static fetch lacks real content. Don't assume the install is healthy — verify first.
Workflow
- Diagnose:
python3 scripts/diagnose_scrapling.py— source of truth for next step. - Fix install:
- CLI missing
click/extras →uv tool uninstall scrapling && uv tool install 'scrapling[shell]'(avoid[all]unless needed). - Browser fetchers needed →
scrapling install(Playwright runtime). Don't claim success until it reports already-installed OR diagnostic confirms Chromium + Chrome Headless Shell.
- CLI missing
- Choose fetcher:
extract getfor normal/article/most WeChat pages →extract fetchwhen static HTML lacks real content / JS-rendered →extract stealthy-fetchonly afterfetchfails on anti-bot (never default). - Run smallest command (always quote URLs — mandatory in zsh with
?/&):scrapling extract get 'URL' page.htmlscrapling extract get 'URL' article.md -s 'main'scrapling extract fetch 'URL' page.html --timeout 20000- WeChat body:
scrapling extract get 'https://mp.weixin.qq.com/s/ID?scene=1' article.md -s '#js_content'
- Validate (never trust exit code):
wc -c article.md,sed -n '1,40p',rg -n '<title>|js_content|rich_media_title|main' page.html. Tiny/empty/missing container → back to step 3.
Failure modes
- TLS
curl: (60) SSL certificate problem→ local trust-store issue, retry with--no-verify(only after confirming the cert error pattern; not by default). - WeChat:
getbeforefetch,-s '#js_content', validate immediately. fetchfails → re-diagnose, confirm browsers present, longer timeout, then stealthy-fetch.
Guardrails
Verify before reinstalling. Don't default to the Python library when user means CLI. Don't jump to browser unless static lacks content. Inspect the saved file, not just exit code. No hardcoded user-specific absolute paths.