360 Secure SkillHub
360 安全技能中心

Hacker News Daily

通过 Python 脚本调用 Hacker News 接口获取热门故事,按分数和默认关键词(AI、编程、创业等)过滤,支持文本或 JSON 输出,结果缓存 4 小时,并可通过环境变量配置代理。

osgood001
osgood001
热度 85.54
最近更新 2026-05-11 17:27:24
分类:搜索依赖:代码执行 / 第三方 API / 读写文件应用场景:研究

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add hn-daily
Metadata
name
hn-daily
description
Fetch and filter Hacker News top stories. Use when user asks for tech news, HN updates, daily news digest, or wants to set up automated HN fetching. Supports keyword filtering (AI, programming, startups) and caching.

Hacker News Daily

Fetch top stories from Hacker News with keyword filtering and caching.

Quick Start

python3 scripts/fetch_hn.py

Options

python3 scripts/fetch_hn.py --limit 5          # Return 5 stories
python3 scripts/fetch_hn.py --min-score 100    # Only stories with 100+ points
python3 scripts/fetch_hn.py --no-cache         # Force fresh fetch
python3 scripts/fetch_hn.py --format json      # JSON output

Proxy

Set HTTP_PROXY or HTTPS_PROXY environment variable if needed:

export HTTPS_PROXY=http://127.0.0.1:7890
python3 scripts/fetch_hn.py

Output

Text format (default):

📰 Hacker News 精选

1. [AI] OpenAI releases new model
   🔗 https://...
   👍 892 分 | 💬 234 评论

JSON format (--format json): Array of story objects with id, title, url, score, etc.

Caching

Results cached for 4 hours at ~/.cache/hn-daily/hn_cache.json. Use --no-cache to bypass.

Keywords

Default filter keywords: ai, llm, gpt, claude, openai, programming, python, rust, startup, machine learning, github, etc.