crawler: --no-cover, --concurrency, drop cross-host sleep + batch-50 Step 1 done
Three crawler ergonomics for batch operations:
--no-cover Skip cover image download. For scan-only modes (license/meta
scrape) this drops ~1.3s/project and avoids slow-CDN hangs.
--concurrency N ThreadPoolExecutor wrapping the per-project loop. Default
1 = serial (current behavior). Anonymous endpoints tolerate
5+ comfortably; output uses a print lock for readable
interleaved progress. fetch_cover plumbs through crawl_one.
Drop cross-host sleep #1: in crawl_one between detail HTML (oshwhub.com)
and cover image (image.lceda.cn). Different hosts — sleep was unnecessary.
Saves ~1s/project. Sleep #2 (post-cover, before next iteration) stays — it
gates the next oshwhub.com hit.
download_to gains max_seconds wall budget (default 60s, cover uses 15s).
Defends against pathologically slow CDN connections — observed 10 KB/s
on image.lceda.cn for one project, would have hung 6+ min on a 3.6 MB
cover otherwise. httpx default timeout resets per chunk, so streaming
downloads need an external wall-clock guard.
batch-50 Step 1 (license/meta scrape) shipped:
50/50 candidates have metadata.json + license recorded
License distribution: GPL 3.0 32, Public Domain 6, NC variants 8,
CERN-OHL 1, MIT 1, CC BY 3.0 1
Forge-friendly (non-NC): 41/50 (82%)
Declared attachments: 180 files / 2.36 GB (median 18 MB/proj, max 304 MB)
Walltime: 3min 26s for 28 projects at concurrency=5 (server-side
HTML render bound, not sleep-bound)
One orphan partial cover (a670e60a...) cleaned up — leftover from the
first aborted run before the timeout fix landed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"source": "oshwhub",
|
||||
"source_url": "https://oshwhub.com/esp-college/esp-sparkbot",
|
||||
"project_id": "91fd41224cd74ffd8410bc77b216693b",
|
||||
"title": "ESP-SparkBot",
|
||||
"description_short": "ESP-SparkBot 基于 ESP32-S3,融合语音交互、图像识别与多媒体娱乐,可变身遥控小车、玩转本地 AI,支持大模型对话、实时视频传输和高清视频投屏,性能强大,乐趣无限!",
|
||||
"description_path": "description.md",
|
||||
"author": {
|
||||
"username": "esp-college",
|
||||
"display_name": "乐鑫小铁匠",
|
||||
"user_id": "16555ec60452466ea4dbaa7c6b92cd89"
|
||||
},
|
||||
"license": "GPL 3.0",
|
||||
"tags": [],
|
||||
"created_at": "2024-10-15T03:45:10.000Z",
|
||||
"updated_at": "2025-11-11T10:24:51.000Z",
|
||||
"published_at": "2025-03-12T05:42:19.000Z",
|
||||
"crawled_at": "2026-04-28T16:59:54.198797+00:00",
|
||||
"metrics": {
|
||||
"likes": 837,
|
||||
"stars": 2135,
|
||||
"forks": 0,
|
||||
"views": 304205,
|
||||
"watch": 0,
|
||||
"comments": 343
|
||||
},
|
||||
"cover": {
|
||||
"url": "https://image.lceda.cn/pullimage/YyPkhuGTNedxg6yM3fkJBovQB2b56pCCJb27zQjN.png",
|
||||
"path": "cover.png"
|
||||
},
|
||||
"files": [
|
||||
{
|
||||
"name": "ESP-Sparkbot V1.0 版本 3D 结构文件.zip",
|
||||
"url": "https://image.lceda.cn/oshwhub/project/attachments/d0d0ef3b19cf40e8b73c83f81aa328b4.zip",
|
||||
"original_id": "019b2563c2af4ec39f6ac69d38f47f02",
|
||||
"ext": "zip",
|
||||
"mime": "application/x-zip-compressed",
|
||||
"size": 4435050,
|
||||
"md5": "5a8a03e419e6698a90675c52cfa79b0b"
|
||||
},
|
||||
{
|
||||
"name": "sparkbot 主体头部后壳(有开关版本)_20250107.STL",
|
||||
"url": "https://image.lceda.cn/oshwhub/project/attachments/796bd6cff4b444c999a75c38063ede51.stl",
|
||||
"original_id": "c24d5e2146234f408cbd6ed081f4ea39",
|
||||
"ext": "stl",
|
||||
"mime": "application/octet-stream",
|
||||
"size": 13559984,
|
||||
"md5": "d01d20c398e3950af6e8ef1107b390ff"
|
||||
},
|
||||
{
|
||||
"name": "esp-sparkbot 配件 3D 模型.zip",
|
||||
"url": "https://image.lceda.cn/oshwhub/project/attachments/0e4e4896bca64ea88202a15658463edc.zip",
|
||||
"original_id": "5fd4991602a54136aad5c0d1cab2d6e2",
|
||||
"ext": "zip",
|
||||
"mime": "application/x-zip-compressed",
|
||||
"size": 1344016,
|
||||
"md5": "4192a0f84a48de1d02efa937afaf69bb"
|
||||
}
|
||||
],
|
||||
"raw_fields": {
|
||||
"path": "esp-college/esp-sparkbot",
|
||||
"grade": 3,
|
||||
"origin": "pro",
|
||||
"public": true,
|
||||
"publish": true,
|
||||
"skipped_files": []
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user