×
Falcon
06-25 19:33
准备做一个用LLM (chapgpt或deepseek)翻译hacker News帖子的功能,并且总结网页内容。

涉及到hacker news的api,可以加 ?print=pretty 查询参数打印格式更清晰一些 :

- Top stories列表:
https://hacker-news.firebaseio.com/v0/topstories.json

- 某个story的详情,如 40786425 的story
https://hacker-news.firebaseio.com/v0/item/40786425.json

- Best stories列表,可以自定义排序方法
https://hacker-news.firebaseio.com/v0/beststories.json


hacker news官方放在github的api 文档不好用,也不好调,我参考是这哥们的,带有Demo: https://github.com/jsuau/hacker-news-api

React Demo:
https://codesandbox.io/p/sandbox/hackernews-top-10-posts-h73km?file=%2Fsrc%2Findex.js%3A40%2C20-40%2C74

Postman下的
https://documenter.getpostman.com/view/9767562/T1LFmVWJ
0

暂无评论