first commit
This commit is contained in:
69
research.md
Normal file
69
research.md
Normal file
@@ -0,0 +1,69 @@
|
||||
# douban crawler
|
||||
|
||||
## 工具
|
||||
Trace Viewer
|
||||
Codegen
|
||||
|
||||
## todo
|
||||
使用playwright,typescript实现豆瓣自动登录功能。
|
||||
|
||||
1. login
|
||||
2. intput book name => bookinfo
|
||||
```json
|
||||
{
|
||||
"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
|
||||
1. login
|
||||
https://accounts.douban.com/passport/login?source=main
|
||||
|
||||
|
||||
## 问题
|
||||
1. 文章中的图片保存解决方案?
|
||||
- 直存数据库
|
||||
- 存本地,数据库中存位置信息。
|
||||
文章中的位置信息呢?也就是拿到图片后,如何在文章中组装呢?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user