Documentation
¶
Overview ¶
Package crawl runs the Baidu mirror: it drains the queue, fetches each item (a Baike lemma or a web search page) through the baidu client, stores the raw bytes and a parsed record, expands the related lemmas it discovers, and marks every row's outcome. The engine is resumable (in-flight rows stay pending) and polite (the client paces itself), and it never silently caps; it logs what it blocks or skips.
Index ¶
Constants ¶
View Source
const ( EntityLemma = "lemma" EntitySERP = "serp" )
Entity type names used as queue keys.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Concurrency int // worker pool size (default 4)
Limit int // max items to process this run (0 = drain the queue)
Logf func(format string, args ...any)
}
Config tunes a crawl run.
Click to show internal directories.
Click to hide internal directories.