打通 oshwhub origin=std 项目的工程源(schematic + PCB dataStr)抓取链路。原
plan.md §1.6 假设需要登录,实测 lceda.cn/api/documents/<doc>?uuid=<doc>&path=<doc>
对公开项目匿名可访问 —— 无需 cookie,无账号封禁风险。
调研:4 轮探测留痕在 data/state/std_probe[1-5]/(gitignored);翻 Std 编辑器
v6.5.51 的 main.min.js bundle 找到 ajaxDetail 端点;按 docType 区分两种
响应 shape(schematic 项目视图 vs PCB 文档视图)。
Crawler:
- make_source_client() 用浏览器 UA + lceda.cn/editor Referer,因为
oshwhub /api/project/<uuid> 端点拒绝 FacereDataset/0.1 UA(CLAUDE.md
UA 例外条款:目标站主动封自定义 UA + 公开静态资源)
- fetch_std_source(): 项目元 → version_documents → 逐文档 dataStr → 落
source/<doc>.json + source/manifest.json
- --with-source(爬新项目时一并抓源)/ --backfill-source(仅扫已有)
- QPS ≤ 0.2 (SLEEP_SOURCE = 5s) 自律
Schema: 加 source_format / source_path / source_documents / editor_version
(前 3 进 enum 锁定,便于后续 Pro / KiCad 源对齐)。
回填结果:10/10 成功,45 个文档,33.2 MB;schema validate 全通。
docTypes 主要是 1 (schematic) 与 3 (pcb);USB 电压电流表只有 PCB 文档(4 个:
主板+盖板+底板+面板,作者未上传原理图源)。
完整调研:docs/sources/easyeda_std_source.md。
84 lines
2.7 KiB
JSON
84 lines
2.7 KiB
JSON
{
|
||
"source": "oshwhub",
|
||
"source_url": "https://oshwhub.com/wesd/h7b0-re-cheng-xiang",
|
||
"project_id": "1b09581d66d34438a1e6513e457e0532",
|
||
"title": "手持红外热成像",
|
||
"description_short": "MLX90640+STM32H7B0的红外热成像,外加一颗ov7670摄像头做辅助显示,最高可做到32HZ的刷新率。",
|
||
"description_path": "description.md",
|
||
"author": {
|
||
"username": "wesd",
|
||
"display_name": "wesd",
|
||
"user_id": "b3f7b33189a14088aa30416e034eca7f"
|
||
},
|
||
"license": "CERN Open Hardware License",
|
||
"tags": [],
|
||
"created_at": "2022-09-06T13:54:54.000Z",
|
||
"updated_at": "2025-07-16T04:50:13.000Z",
|
||
"published_at": "2023-11-08T01:25:18.000Z",
|
||
"crawled_at": "2026-04-23T11:31:34.277837+00:00",
|
||
"metrics": {
|
||
"likes": 247,
|
||
"stars": 646,
|
||
"forks": 175,
|
||
"views": 73081,
|
||
"watch": 0,
|
||
"comments": 266
|
||
},
|
||
"cover": {
|
||
"url": "https://image.lceda.cn/pullimage/t7auihPq2yo15qct0rCwUXUdBubfIkMhOd1UqaJ1.jpeg",
|
||
"path": "cover.jpeg"
|
||
},
|
||
"files": [
|
||
{
|
||
"name": "1.zip",
|
||
"url": "https://image.lceda.cn/attachments/2022/10/aWLQlbeyYn7SOVykc2x9OWuHpCi5TpXJZfzuQVXS.zip",
|
||
"original_id": "ad6720dbc62a4152aa6267e24621a700",
|
||
"ext": "zip",
|
||
"mime": "application/x-zip-compressed",
|
||
"size": 524804,
|
||
"md5": "7b5d94829be2e562228791a3ce9041ec",
|
||
"path": "files/1.zip",
|
||
"sha256": "9210315e8660a91932567dafac2959fc31f20bb05e8992363bad44d422144f1d"
|
||
},
|
||
{
|
||
"name": "H7B0_IRCAM.rar",
|
||
"url": "https://image.lceda.cn/attachments/2023/11/40UrslRfPUk0LUDL5UzA1d8QLzSKrn8lZS41hpxk.rar",
|
||
"original_id": "516214a3934d43e1a8395923f923a777",
|
||
"ext": "rar",
|
||
"mime": "application/octet-stream",
|
||
"size": 2968329,
|
||
"md5": "ba10570948bc2e24abb66bce0b7231e0",
|
||
"path": "files/H7B0_IRCAM.rar",
|
||
"sha256": "c6de1749d1fc88b637d06dced7e6da14610c5f44c3879bdbbbb5c66f73b81652"
|
||
}
|
||
],
|
||
"raw_fields": {
|
||
"path": "wesd/h7b0-re-cheng-xiang",
|
||
"grade": 4,
|
||
"origin": "std",
|
||
"public": true,
|
||
"publish": true,
|
||
"skipped_files": []
|
||
},
|
||
"source_format": "easyeda-std",
|
||
"source_path": "source/",
|
||
"source_documents": [
|
||
{
|
||
"doc_uuid": "d72b82ac43ce47a3847a41f702f00011",
|
||
"docType": 1,
|
||
"master": "adc48975ee534d2aac6c1a083ca026c7",
|
||
"path": "source/d72b82ac43ce47a3847a41f702f00011.json",
|
||
"size": 250090,
|
||
"sha256": "be90df57eaae52347f6500b0b2c2aa7f30c4d243a323c412011877b908c4b5c4"
|
||
},
|
||
{
|
||
"doc_uuid": "434454b505d2475bb2e9a85e5a2b5f63",
|
||
"docType": 3,
|
||
"master": "b5ec22bb06bf49f5a630bcc70d01e233",
|
||
"path": "source/434454b505d2475bb2e9a85e5a2b5f63.json",
|
||
"size": 1417770,
|
||
"sha256": "8866e9ebbf3d43759af15e18a9bdca0c985e34b4074052f382ab5090f5905433"
|
||
}
|
||
],
|
||
"editor_version": "6.5.22"
|
||
} |