[Bug]: SEOFilter drops keywords and weights in dump()/load()
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 38/100
Hướng nghiên cứu
Start with SEOFilter in crawl4ai/deep_crawling/filters.py and compare its serialization with the deep-crawl filters fixed in #2425. Reproduce the loss using the snippet in the issue, then check to_serializable_dict() and CrawlerRunConfig.dump()/load(). Done means keywords and custom weights survive a round trip and the loaded filter scores pages with them.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
crawl4ai version
0.9.5 (also on develop)
Expected Behavior
SEOFilter keeps keywords and weights through to_serializable_dict() / CrawlerRunConfig.dump() and load(), like the other deep-crawl filters after #2425.
Current Behavior
SEOFilter compiles its keywords into a regex and keeps only the pattern (_kw_patterns), and keeps weights in a private slot, so both are dropped when serialized:
SEOFilter(threshold=0.5, keywords=["python"], weights={"title_kw": 1.0})
-> {'type': 'SEOFilter', 'params': {'threshold': 0.5}}
A loaded filter then scores pages with no keywords and the default weights.
Is this reproducible?
Yes
Inputs Causing the Bug
Any SEOFilter with keywords or weights.
Steps to Reproduce
Run the snippet below.
Code snippets
from crawl4ai.async_configs import to_serializable_dict
from crawl4ai.deep_crawling.filters import SEOFilter
print(to_serializable_dict(SEOFilter(threshold=0.5, keywords=["python"], weights={"title_kw": 1.0})))
# {'type': 'SEOFilter', 'params': {'threshold': 0.5}}
OS
Windows 11 (platform-independent)
Python version
3.13
Browser
Not involved
Error logs & Screenshots (if applicable)
None; no error is raised.
Found by @SohamKukreti in the review of #2425. Unlike the classes fixed there, the raw keyword list has to be stored, not only exposed, because only the compiled pattern was kept. I'll open a PR.
- Ngôn ngữ chính
- Python
- Star
- 87.2k
- Fork
- 9.1k
- Merge trung bình
- 1 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 25
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của unclecode/crawl4ai
-
BUG: UserAgentGenerator.generate ignores browser_type and returns a random browser stackCó thể đã có người làm @HhH666-ux đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: Hardened docker-compose (read_only) keeps full Chromium from starting: crashpad needs a writable ~/.configCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở🐞 Bug 📌 Root caused
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
unclecode/crawl4ai#2494 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Feature]: Crawl4aiDockerClient has no public option for the API token the 0.9 server requiresĐang mở⚙ Done ✨ Enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
⚙ Done 🐞 Bug 📌 Root caused
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: PDF images saved with save_images_locally=True come back with an empty src in result.mediaĐang mở⚙ Done 🐞 Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
unclecode/crawl4ai#2469 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của unclecode/crawl4ai
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
521xueweihan/HelloGitHub#4385 ·
-
🐛 bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
pdm-project/pdm#4012 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
pollen-robotics/reachy_mini_conversation_app#611 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 91/100
aws-samples/sample-per-model-bedrock#913 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
lesson-submission pending-review
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
Ikalus1988/MisakaNet#5115 ·
Maintainer thường phản hồi trong vòng 1 ngày