update komica trends [CI] 2026-03-23 14:45:05
這是為 Hot Now 網站提供資料的爬蟲專案,負責收集各種熱門內容的最新資訊。
Hot Now 是一個整合各大平台熱門內容的資訊聚合網站,讓使用者能夠一站式瀏覽各種熱門話題。
Hot Now 提供了 Chrome 擴充功能,讓你每次開啟新分頁時都能即時掌握最受歡迎的熱門網路討論話題。
Hot Now 整合了以下平台的熱門內容:
本專案專門負責以下平台的資料爬取:
data/ptt-trends.json
data/google-trends.json
data/komica-trends.json
data/bbc-trends.json
trend-scraper/ ├── src/ │ ├── scrapers/ # 爬蟲腳本 │ │ ├── bbc.ts # BBC中文新聞爬蟲 │ │ ├── google.ts # Google熱搜爬蟲 │ │ ├── komica.ts # K島熱門文章爬蟲 │ │ └── ptt.ts # PTT熱門文章爬蟲 │ ├── config/ # 設定檔 │ │ └── constants.ts # 常數設定 (URL, User-Agents) │ ├── utils/ # 工具函式 │ │ ├── browser.ts # Puppeteer 瀏覽器管理 │ │ ├── common.ts # 通用工具 │ │ ├── file-manager.ts # 檔案讀寫管理 │ │ └── logger.ts # 日誌系統 │ └── types.ts # TypeScript 型別定義 ├── data/ # 爬蟲資料儲存 │ ├── bbc-trends.json # BBC中文新聞資料 │ ├── google-trends.json # Google熱搜資料 │ ├── komica-trends.json # K島熱門資料 │ └── ptt-trends.json # PTT熱門資料 ├── .github/workflows/ # GitHub Actions工作流程 │ ├── update-bbc.yml # BBC中文新聞自動更新 │ ├── update-google.yml # Google熱搜自動更新 │ ├── update-komica.yml # K島自動更新 │ └── update-ptt.yml # PTT自動更新 ├── package.json # 專案設定 ├── tsconfig.json # TypeScript設定 └── pnpm-lock.yaml # 依賴鎖定檔
# 克隆專案 git clone https://github.com/garylin0969/trend-scraper.git cd trend-scraper # 安裝依賴 pnpm install # 安裝 Puppeteer Chromium npx puppeteer browsers install chrome
# 爬取 BBC 中文新聞 pnpm scrape:bbc # 爬取 Google 熱搜 pnpm scrape:google # 爬取 PTT 熱門文章 pnpm scrape:ptt # 爬取 K島 熱門文章 pnpm scrape:komica
本專案使用 GitHub Actions 實現自動化爬蟲,每個平台都有獨立的工作流程:
.github/workflows/update-bbc.yml
15,45 * * * *
.github/workflows/update-google.yml
5,35 * * * *
.github/workflows/update-komica.yml
18,48 * * * *
.github/workflows/update-ptt.yml
1,11,21,31,41,51 * * * *
為了確保爬蟲穩定運作,本專案採用了多種反偵測技術:
本專案使用 GitHub Pages 提供即時的 JSON 資料 API,任何人都可以透過以下端點取得最新資料:
所有 API 端點都支援 CORS,可以直接在前端應用程式中使用,無需額外的代理服務。
{ "updated": "2025-07-15T07:41:30.769Z", "channel": { "title": "BBC Chinese", "description": "BBC Chinese - BBC News , 中文 - 主頁", "link": "https://www.bbc.com/zhongwen/trad", "lastBuildDate": "2025-07-15T07:41:16.000Z", "language": "zh-hant", "copyright": "英國廣播公司 版權所有 " }, "trends": [ { "title": "「魷魚遊戲」下結業潮來襲,香港餐飲業能重返「美食天堂」嗎?", "description": "BBC中文訪問研究飲食文化及經濟學者,以及業內人士,剖析香港餐飲業結業潮的癥結。", "link": "https://www.bbc.com/zhongwen/articles/c1k8ge4zjw0o/trad", "pubDate": "2025-07-15T01:10:24.000Z", "guid": "https://www.bbc.com/zhongwen/articles/c1k8ge4zjw0o/trad#0", "thumbnail": "https://ichef.bbci.co.uk/ace/ws/240/cpsprodpb/ed09/live/e6eda9f0-5dbe-11f0-8328-5fcabfbdb3e1.jpg" } ] }
{ "updated": "2025-07-05T09:53:34.781Z", "total_found": 20, "returned_count": 20, "articles": [ { "recommendScore": "673", "recommendCount": "1018", "title": "[問卦] 北檢撐法治,我們撐北檢!", "link": "/bbs/Gossiping/M.1751680585.A.4E1", "author": "ambitious", "board": "Gossiping", "publishTime": "2025/07/05 01:56", "imageUrl": "https://cache.pttweb.cc/imgur/Y4T1d9a/s/..." } ] }
{ "updated": "2025-07-05T09:47:00.588Z", "trends": [ { "googleTrend": "段宜恩", "searchVolume": "500+", "started": "3 小時前" } ] }
{ "updated": "2025-07-05T09:39:36.119Z", "trends": [ { "replyCount": 130, "date": "2025/07/05", "time": "00:25", "title": "中國水世界 夏日季節活動", "description": "6月26日貴州榕江縣上游水庫洩洪,河水暴", "link": "https://gita.komica1.org/00b/pixmicat.php?res=28143559", "rawText": "130|28143559|2025/07/05|00:25|中國水世界 夏日季節活動|6月26日貴州榕江縣上游水庫洩洪,河水暴|在新分頁開啟" } ] }
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号
🔥 Hot Now 爬蟲專案
這是為 Hot Now 網站提供資料的爬蟲專案,負責收集各種熱門內容的最新資訊。
🌟 專案簡介
Hot Now 是一個整合各大平台熱門內容的資訊聚合網站,讓使用者能夠一站式瀏覽各種熱門話題。
🎯 Chrome 擴充功能
Hot Now 提供了 Chrome 擴充功能,讓你每次開啟新分頁時都能即時掌握最受歡迎的熱門網路討論話題。
特色
📊 支援平台
Hot Now 整合了以下平台的熱門內容:
🕷️ 本專案負責的爬蟲
本專案專門負責以下平台的資料爬取:
1. PTT 熱門文章
data/ptt-trends.json2. Google 熱搜榜
data/google-trends.json3. Komica(K 島) 熱門文章
data/komica-trends.json4. BBC 中文新聞
data/bbc-trends.json🏗️ 技術架構
技術棧
專案結構
🚀 本地開發
環境需求
安裝步驟
執行爬蟲
🤖 自動化部署
本專案使用 GitHub Actions 實現自動化爬蟲,每個平台都有獨立的工作流程:
BBC 中文新聞自動更新
.github/workflows/update-bbc.yml15,45 * * * *Google 熱搜自動更新
.github/workflows/update-google.yml5,35 * * * *K 島自動更新
.github/workflows/update-komica.yml18,48 * * * *PTT 自動更新
.github/workflows/update-ptt.yml1,11,21,31,41,51 * * * *📋 爬蟲特色
BBC 爬蟲
PTT 爬蟲
Google 熱搜爬蟲
K 島爬蟲
🛡️ 反爬蟲策略
為了確保爬蟲穩定運作,本專案採用了多種反偵測技術:
🌐 資料 API
本專案使用 GitHub Pages 提供即時的 JSON 資料 API,任何人都可以透過以下端點取得最新資料:
API 端點
CORS 支援
所有 API 端點都支援 CORS,可以直接在前端應用程式中使用,無需額外的代理服務。
📈 資料格式
BBC 中文新聞
PTT 熱門文章
Google 熱搜
K 島 熱門文章
🔗 相關連結