Skip to content

Fix/xiaohongshu download#281

Closed
pancato wants to merge 2 commits intojackwener:mainfrom
pancato:fix/xiaohongshu-download
Closed

Fix/xiaohongshu download#281
pancato wants to merge 2 commits intojackwener:mainfrom
pancato:fix/xiaohongshu-download

Conversation

@pancato
Copy link

@pancato pancato commented Mar 23, 2026

Description

Please check if this is a bug. I discovered that it previously downloaded user avatars and other resources as well.

Copy link
Contributor

@Astro-Han Astro-Han left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense — downloading avatars alongside content images is definitely a bug. One thing: the imageSelectors array still has broader selectors like img[src*="ci.xiaohongshu.com"] which could match avatars too (they're hosted on the same CDN). Might be worth narrowing those in the same pass to fully fix the false positive issue.

@jackwener
Copy link
Owner

Closing: the download refactoring changed this file significantly. The fix is valid and will be applied directly on a clean branch.

@jackwener jackwener closed this Mar 23, 2026
jackwener added a commit that referenced this pull request Mar 23, 2026
Narrow '#noteContainer img[src*="xhscdn"]' to
'#noteContainer .media-container img[src*="xhscdn"]'
to exclude user avatars and sidebar icons from downloads.

Closes #281
jackwener added a commit that referenced this pull request Mar 23, 2026
…293)

Narrow '#noteContainer img[src*="xhscdn"]' to
'#noteContainer .media-container img[src*="xhscdn"]'
to exclude user avatars and sidebar icons from downloads.

Closes #281
@jackwener
Copy link
Owner

Hi @pancato, thank you for your contribution! 🎉

We had to close this PR due to a rebase conflict that arose from a concurrent download adapter refactoring, but your bug report and fix were spot-on.

We implemented the same fix in #293 and credited you as a co-author. Really appreciate you taking the time to identify and report this issue — it was a great catch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants