update
This commit is contained in:
@ -7,17 +7,3 @@ type CrawlBrand struct {
|
||||
BrandUID string `json:"brand_uid"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
// CrawlExistsRequest 图集预检请求:一次问一批 source_url 是否已爬取过。
|
||||
// 设计为批量而非逐个,是因为爬虫在拿到列表页后能一次拼出几十上百个图集链接,
|
||||
// 逐个问会退化成 N 次 HTTP 往返,反而比直接抓取更慢。
|
||||
type CrawlExistsRequest struct {
|
||||
SourceURLs []string `json:"source_urls"`
|
||||
}
|
||||
|
||||
// CrawlExistsResponse 图集预检响应。existing 为「已爬取过、无需再抓」的 source_url 列表;
|
||||
// 未出现在其中的即认为需要抓取。
|
||||
type CrawlExistsResponse struct {
|
||||
Existing []string `json:"existing"` // 已爬取过的 source_url,爬虫应跳过
|
||||
ExistingCount int `json:"existing_count"` // 命中数量,便于爬虫打日志观察命中率
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user