funboost-spider-crawling

Build distributed web crawlers by decorating Python functions with funboost queue scheduling.

892|166|Updated Dec 25, 2021
One-click install
npx skills add https://github.com/ydf0509/funboost --skill funboost-spider-crawling-ydf0509
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: funboost-spider-crawling
Source: https://github.com/ydf0509/funboost/tree/main/.agents/skills/funboost-spider-crawling
Command: npx skills add https://github.com/ydf0509/funboost --skill funboost-spider-crawling-ydf0509

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires funboost, httpx, parsel, sqlmodel, boost_spider.

What problem does it solve? Building distributed web crawlers usually requires heavy frameworks like Scrapy with rigid callback chains, forced project structures, and limited concurrency. This Skill lets you turn any Python function into a distributed crawling task with one @boost decorator, gaining queue scheduling, retries, deduplication, and QPS control without framework lock-in. ## Core Features & Use Cases - Function-level scheduling: Decorate any function with @boost(BoosterParams(...)) to get distributed consumption, ACK-based reliability, function-level retries, and precise QPS rate limiting across processes and machines. - Three crawling modes: Use pure @boost with any HTTP library, the built-in funspider module (SimpleSpiderClient, AsyncSpiderClient, SpiderItem ORM with upsert), or the boost_spider package (RequestClient, DatasetSink) — freely mixable. - Parameter-based deduplication: do_task_filtering removes duplicate tasks by function arguments with configurable expiration, avoiding noisy URL fingerprint issues. - Use Case: Build a news crawler where a list-page function pushes detail URLs to a second queue, a detail function parses and upserts rows into MySQL via SpiderItem, and an async function fetches comments — all started with one BoostersManager.consume_group call. ## Quick Start Ask the AI to write a funboost distributed crawler that fetches a list page, pushes detail URLs to a second queue, parses them with funspider, and upserts results into MySQL.

Frequently Asked Questions about funboost-spider-crawling

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a distributed web crawler with funboost?▼

Decorate a plain Python function with @boost(BoosterParams(queue_name=..., broker_kind=BrokerEnum.REDIS_ACK_ABLE, qps=5)), then call func.push(...) to dispatch tasks and func.consume() to start workers. Chain queues by pushing from one boosted function into another.

funspider vs boost_spider: which crawling client should I use?▼

funspider provides SQLModel-based SpiderItem ORM with typed models and sync/async httpx clients, suiting team projects with managed schemas. boost_spider offers a requests-compatible RequestClient with proxy failover and dict-based DatasetSink storage, suiting minimal quick scripts.

How does funboost compare to Scrapy for web scraping?▼

Funboost schedules whole functions instead of Request objects, so you write linear code with any HTTP library rather than callback chains. It adds precise QPS control, multi-process concurrency, function-level retries, and Redis-based triggering, while Scrapy enforces Twisted and a fixed project layout.

Does funboost support async crawling with httpx?▼

Yes. Set concurrent_mode=ConcurrentModeEnum.ASYNC, define the consumer as async def, and use AsyncSpiderClient with await client.get(...). Tasks must be published with await func.aio_push(...) and items stored via aio_upsert().

How do I prevent duplicate URL crawling in funboost?▼

Enable do_task_filtering=True in BoosterParams and set task_filtering_expire_seconds. Funboost deduplicates by function arguments in Redis, so identical pushed parameters are skipped within the expiration window, ignoring noisy URL query parameters.

Why does my funboost crawler retry even when HTTP returns 200?▼

Funboost retries at the function level: any exception raised inside the function triggers a retry up to max_retry_times. If a 200 response contains a captcha or empty data, raise an exception explicitly to force a retry, unlike Scrapy which only retries network failures.