Skip to content

Commit

Permalink
feat: Adapt to Xiaohongshu
Browse files Browse the repository at this point in the history
  • Loading branch information
wujiuye committed Jan 17, 2025
1 parent d651f3b commit 0c485d8
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/site-adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,33 @@ const siteAdapters = {
]
},

// 小红书
'xiaohongshu.com': {
name: '小红书',
selectors: [
{
type: 'post-list',
elements: [
'section a[class^="title"]'
]
},
{
type: 'post',
elements: [
'div[id="detail-title"]',
'div[id="detail-desc"] span[class^="note-text"]',
]
},
{
type: 'comment',
elements: [
'div[class^="comment-inner-container"] div[class^="content"] span',
'div[class^="comment-inner-container"] span[class^="content"] span'
]
}
]
},

// 通用适配器
'default': {
name: 'Default',
Expand Down

0 comments on commit 0c485d8

Please sign in to comment.