V2EX Honwhy 的所有回复 第 1 页 / 共 21 页
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX    Honwhy    全部回复第 1 页 / 共 21 页
回复总数  410
1  2  3  4  5  6  7  8  9  10 ... 21  
学习前端知识吧。
1 、Javascript 高级程序设计
2 、Vue 设计与实现
3 、jQuery 技术内幕(老古董,但是思路还是不错的。。。,随便翻翻不建议全读,太大部头了。。。
。。。还有很多,欢迎补充
我曾经做过考古,方式还是蛮多的。(当然我现在使用的是免费的方案) https://i.imgur.com/agAJ0Rd.png
1 、https://mp.weixin.qq.com/s/uiJMQYTwGFcPLAzIj5ad6w
2 、https://honwhy.wang/posts/2025-08-24-github-cf-pages-blog/
@Honwhy #3 爬虫脚本要调整下,
$('#hexo-douban-item3 .hexo-douban-item').each((_, el) => {
const title = $(el).find('.hexo-douban-title').text().trim()
const url = $(el).find('.hexo-douban-title > a').attr('href').trim()
// const author = $(el).find('.book-author').text().trim()
const img = $(el).find('.hexo-douban-picture>img').attr('src')
const review = $(el).find('.hexo-douban-comments').text().trim()
const rating = review.slice(0, 10).replace(/[^0-9.]/g, '')
books.push({ title, url, rating, cover: img, description: review })
})
@EngAPI #9 我 get 到你的意思了,我想想怎么支持下。
@EngAPI https://i.imgur.com/Zshuhgg.png
已经支持了。 请享用。

速度并不会很快,要读取豆瓣的豆列。
@EngAPI 准备支持豆瓣书单,例如这个,https://www.douban.com/doulist/45097500/

正在开发中。。。

感谢关注和支持
@conge 我通过 cheerio 爬取了这个网址所有书籍,然后结合书单的数据结构 JSON ,做了一次拼装。
然后再导入进来。

## 效果
https://i.imgur.com/90F4gMg.png

https://i.imgur.com/nQZEwG5.png
## 代码
```js
import fs from 'node:fs' // 导入 fs 模块来读取文件
import path from 'node:path' // 导入 path 模块来处理文件路径
import { fileURLToPath } from 'node:url' // 导入 fileURLToPath
import * as cheerio from 'cheerio'
import clipboardy from 'clipboardy' // 导入 clipboardy 包
import fetch from 'node-fetch'

// 获取当前文件的目录名
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
async function scrapeBooks() {
const url = 'https://conge.livingwithfcs.org/books/'
const resp = await fetch(url)
const html = await resp.text()
const $ = cheerio.load(html)

const books = []

$('.hexo-douban-item').each((_, el) => {
const title = $(el).find('.hexo-douban-title').text().trim()
// const author = $(el).find('.book-author').text().trim()
const img = $(el).find('.hexo-douban-picture>img').attr('src')
const review = $(el).find('.hexo-douban-comments').text().trim()
const rating = review.slice(0, 10).replace(/[^0-9.]/g, '')
books.push({ title, rating, cover: img, description: review })
})
// 使用 __dirname 确保路径正确
const bookListPath = path.join(__dirname, '../public/book-lists.json')
const bookListRaw = fs.readFileSync(bookListPath, 'utf8')
const bookList = JSON.parse(bookListRaw)

bookList[0].books = books
bookList[0].name = 'conge-书单'
bookList[0].qrCodeUrl = url
// bookList stringify and copy to clipboard
// 使用 clipboardy.write() 写入剪贴板
await clipboardy.write(JSON.stringify(bookList, null, 2))

console.log('数据已成功抓取并复制到剪贴板!')
}

scrapeBooks()
```
## 可惜
- 书单中缺少作者信息
- 书单的评论描述有的缺少,只有评分
- 书单的评论描述有的太长了(是否能提供更加言简意赅的精彩点评)
- 书单还缺少分类,生成的图片太长了,可能会导出失败,是否可以增加分类榜单呢
25 天前
回复了 loovezsh 创建的主题 投资 A 股超短,题材切换研究
你用了 AI 来总结了 吗。
抓热点新闻,喂给 AI 查询相关行业股票,查询龙头股票,查询股价走势,做出预测?
26 天前
回复了 Honwhy 创建的主题 Java 使用 Java 技术栈生成二维码
@geying
qrgen 地址:qrgen: https://github.com/honwhy/qrgen
我的 demo 项目地址:java-examples: https://github.com/honwhy/java-examples
公众号文章: https://mp.weixin.qq.com/s/yFy0P1j8naqXypn0xxlElw
还好吧。 难度不算大。
由于一开始项目设定是 JWT 认证登录的。为了集成 better-auth 的邮箱登录、OAuth 登录,遂做了两次 hack

1\ 邮箱登录时,调用 auth.api.signInEmail api 接口登录认证,构造了 Session-Cookie 关系,手工将 signInEmail 的响应 Set-Cookie 转发一次(用 Hono 的 setCookie )
然后才是对用户 ID 做 JWT TOKEN
2\ OAuth 登录时,首先调用 auth.api.signInSocial ,搞定第一步搞临时票据,跳转 github oauth 服务

回调后,要注意,无法调用 auth.api.callbackOAuth API ,只能自己模拟请求调用 auth.handler(new Request())
执行结果后,即构造了 Session-Cookie 关系

此时,还不知道用户 ID ,所以必须执行一次 auth.api.getSession 拿到用户信息


然后才是对用户 ID 做 JWT TOKEN
@RavelloH 你这个技术选型比我的好。

我的穷鬼套餐,https://v2ex.com/t/1154618?p=1#reply5

文章总结: https://honwhy.wang/posts/2025-08-10-cf-worker-full-stack/
PostgreSQL 数据库
Redis 缓存
Google Gemini API
等等,都是收费的把
@chenweiask #4 可以了解下 cloudflare workers 全栈化。
https://honwhy.wang/posts/2025-08-10-cf-worker-full-stack/
@AionHaiJun #4 你可以看看 MkSaas 这个项目,项目有开源的。
@AionHaiJun
有 bug 我继续修。刚才我在本地测试了下删除账号是没有问题的。
项目本身提供知识卡片的功能,并没有盈利的着力点。只有一个想法,挂 adsense 。
第一次独立搞定 cf workers 穷鬼套餐,有不少经验教训,欢迎交流(这是财富。。。
非常聪明的做法、设计
有调研过 better-auth 吗 平替下 clerk
@laox0 #5 我给 op 推荐一下 wxt 这个框架。btw 我的 github 也有不少开源的插件项目。 可以参考参考。
1  2  3  4  5  6  7  8  9  10 ... 21  
关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     2982 人在线   最高记录 6679       Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 26ms UTC 12:08 PVG 20:08 LAX 05:08 JFK 08:08
Do have faith in what you're doing.
ubao snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86