Commit 782ddbb3 authored by 谢宇轩's avatar 谢宇轩

feat: add digitimes tech bundle

parent fc35d083
{
"format": "news-harvester-source",
"version": 1,
"exportedAt": "2026-08-24T10:01:13.175Z",
"source": {
"id": "digitimes-tech",
"name": "电子时报·科技",
"homepageUrl": "https://www.digitimes.com/tech/",
"method": "browser",
"vaultFolder": "电子时报/科技"
},
"files": {
"helpers/digitimes-tech.md": "---\nsource: digitimes-tech\nlistSelector: 'div.col-12, div.title-frame, div.topic-relative-wrapper, div.news-photo-wrapper'\nlinkSelector: 'a[href]'\nurlPattern: 'digitimes\\.com/news/a\\d+.*\\.html'\nexcludeUrlPattern: 'a\\d{8}PR\\d+'\nscrollSteps: 3\nscrollWaitMs: 2000\nwaitMs: 15000\n# ── 翻页(可选)── 站点把文章列表分多页时启用。两种模式互斥,最多配一个。\n# 配了翻页字段后还需在 config.json 该 source 下设 paginate: true 才生效。\n# nextSelector: 'a.next' # 点击\"下一页\"元素翻页\n# pageUrlTemplate: null # 或用 URL 模板 'https://site.com/news/page/{page}'\n# pageStart: 2 # pageUrlTemplate 起始页码(≥2)\n# maxPages: 5 # 最多翻页数(不含首页)\n# pageWaitMs: null # 翻页后等待(null 回退到 scrollWaitMs)\nbodySelectors:\n - '[class*=\"articleBodyContent\"] p'\n - '[class*=\"article-body\"] p'\n - '[id*=\"news_content\"] p'\n - 'article p'\nbodyMinParagraphs: 3\ndateSelector: 'time[datetime]'\nauthorSelector: '[rel=\"author\"], [class*=\"author\"] a'\nimageSelector: 'img'\nimageMinWidth: 200\nexcludeImage:\n - logo\n - icon\n - avatar\n - profile\n - /ad/\n - viewpoint\ntitleStripSuffix: ' ?\\|? ?DIGITIMES.*'\nmaxBodyChars: 15000\n---\n# 电子时报·科技 抓取备忘\n\n- 栏目页 https://www.digitimes.com/tech/ 文章卡片分散在 5 类容器(inspect 实测):\n `div.col-12`(主列表 21 篇)、`div.title-frame`(头条 2)、`div.topic-relative-wrapper`(话题相关 3)、\n `div.news-photo-wrapper`(图片头条 1)。`li.item` 是 topic 导航栏,已排除。\n- urlPattern 锁定文章形态 `/news/a<日期><类别码><序号>[/slug].html`,如 `a20260824VL206/nvidia-....html`。\n- excludeUrlPattern 排除 `PR` 类别码(企业新闻稿,如 `a20260821PR204.html`)。\n- 付费墙站点:登录态存于 analyzer-profile,正文抓取依赖已登录 cookie;登录失效时 preview/harvest 退出码 70。\n- 验证: node scripts/preview.js --url https://www.digitimes.com/tech/ --recipe helpers/digitimes-tech.md --count 3\n",
"helpers/digitimes-tech.fixtures.json": "{\n \"_comment\": \"Regression fixtures for the digitimes-tech recipe. Article URLs must fetch with body >= 500 chars (paywalled — requires logged-in analyzer-profile). One URL per card container: news-photo-wrapper / title-frame / col-12 x2 / topic-relative-wrapper. Verified 2026-08-24 against https://www.digitimes.com/tech/. Update when archived — pick current articles with the same /news/a<date><code>/ path shape.\",\n \"articles\": [\n \"https://www.digitimes.com/news/a20260821PD208/foplp-packaging-production-demand-taiwan.html\",\n \"https://www.digitimes.com/news/a20260824PD214/asic-mediatek-guc-alchip-war.html\",\n \"https://www.digitimes.com/news/a20260824VL206/nvidia-data-center-2027-dram-bloomberg.html\",\n \"https://www.digitimes.com/news/a20260824VL210/samsung-capacity-dram-wafer-2027.html\",\n \"https://www.digitimes.com/news/a20260821PD214/bosch-equipment-taiwan-growth-cowos.html\"\n ],\n \"sections\": [\n \"https://www.digitimes.com/tech/\",\n \"https://www.digitimes.com/topic/semiconductors/\"\n ],\n \"minLinks\": 20\n}\n"
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment