1.5 KiB
1.5 KiB
douban crawler
工具
Trace Viewer Codegen
todo
使用playwright,typescript实现豆瓣自动登录功能。
- login
- intput book name => bookinfo
{
"book": {
"id": "2567698",
"title": "三体",
"author": "刘慈欣",
"publisher": "重庆出版社",
"publication_date": "2008-01-01",
"number_page": "200",
"cover": "https://img.doubanio.com/797979/cover.jpg",
"isbn": "9787536692930",
"rating": {
"average": 4.8,
"max": 5,
"min": 0,
"rating_count": 12834,
"five_star": 9500,
"four_star": 2500,
"three_star": 600,
"two_star": 150,
"one_star": 84
}
},
"reviews": [
{
"user": "有卡里"
"rating": 5,
"title": "宇宙的黑暗森林法则",
"content": "《三体》让我重新思考人类文明在宇宙中的位置。",
"likes": 42,
"comments_count": 3,
"created_at": "2025-10-23T09:00:00Z"
},
{
"user": "等级分"
"rating": 5,
"title": "测试评论",
"content": "《三体》登陆发大水了饭卡。",
"likes": 21,
"comments_count": 1,
"created_at": "2025-10-22T19:00:00Z"
},
]
}
selector
问题
- 文章中的图片保存解决方案?
- 直存数据库
- 存本地,数据库中存位置信息。 文章中的位置信息呢?也就是拿到图片后,如何在文章中组装呢?