Conversation
…ndardize string literals.
Astro-Han
left a comment
There was a problem hiding this comment.
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.
|
Closing: the download refactoring changed this file significantly. The fix is valid and will be applied directly on a clean branch. |
Narrow '#noteContainer img[src*="xhscdn"]' to '#noteContainer .media-container img[src*="xhscdn"]' to exclude user avatars and sidebar icons from downloads. Closes #281
|
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! |
Description
Please check if this is a bug. I discovered that it previously downloaded user avatars and other resources as well.