Files
Knowit c6fd111d6d 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>
2026-04-29 01:35:11 +08:00

41 lines
1.7 KiB
JSON

{
"detail_url": "https://oshwhub.com/course-examples/bot-dog",
"cover_url": "https://image.lceda.cn/oshwhub/b5a3370cb7994efc8d4051635879d0a1.jpg",
"attachments": [
{
"name": "EDA-Robot演示视频.mp4",
"url": "https://image.lceda.cn/oshwhub/project/attachments/b3f76c6e5f174920be5ff881c51cb053.mp4",
"original_id": "94da385b92e5447aaa4a8b5aa2921136"
},
{
"name": "EDA-Robot机器狗项目.zip",
"url": "https://image.lceda.cn/oshwhub/project/attachments/79ea8924fab54c65a5060b3d5df74900.zip",
"original_id": "c7187eb4deb046398d8f9a47020da3c1"
},
{
"name": "EDA-Robot(180度舵机版)_V1.0.zip",
"url": "https://image.lceda.cn/oshwhub/project/attachments/2686655fc5e54288b6389d81cb3d9545.zip",
"original_id": "77008a152d1142c7b8bada57efba4f16"
},
{
"name": "EDA-Robot(180度舵机版)_V1.1.zip",
"url": "https://image.lceda.cn/oshwhub/project/attachments/1cbae5b1f7ed4f9d9209d771c856396a.zip",
"original_id": "9b5ab50965a946eab2f7326ade3b7465"
},
{
"name": "软件源码.zip",
"url": "https://image.lceda.cn/oshwhub/project/attachments/3d5e14de313647bcbc6fd047787b4c71.zip",
"original_id": "1a79d93c790847a39aca291ce940a60e"
},
{
"name": "EDA-Robot(360度舵机版).zip",
"url": "https://image.lceda.cn/oshwhub/project/attachments/1f105ddb15984777b02b3d6a41b089f5.zip",
"original_id": "8996994d4a1646b888a230163fba5534"
},
{
"name": "简易四足机器狗物料清单.xlsx",
"url": "https://image.lceda.cn/oshwhub/project/attachments/a4df9115d8274e9d8caf18fcf3efd458.xlsx",
"original_id": "dd7f90c81c5143d48b48897b99bd41ea"
}
]
}