ContentTypeFilter rejects every URL that carries a query string or fragment
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 1/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 25/100
Direzione di ricerca
Start with ContentTypeFilter._extract_extension in crawl4ai/deep_crawling/filters.py, and compare it with how URLPatternFilter uses urlparse(url).path. Strip the fragment and query before splitting the extension, then check that page.html?v=2 and page.html#section report html while extensionless URLs stay allowed. Done means regression tests cover these cases. Open PR #2555 already targets this, so coordinate with it before starting.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
ContentTypeFilter._extract_extension() reads the extension from the raw URL, so a query string or fragment becomes part of it:
from crawl4ai.deep_crawling.filters import ContentTypeFilter
f = ContentTypeFilter(allowed_types=["text/html"])
f.apply("https://example.com/page.html") # True
f.apply("https://example.com/page.html?v=2") # False (extension parsed as "html?v=2")
f.apply("https://example.com/page.html#section") # False
Any allowed HTML page reachable only through a query string (pagination, ?utm_* links, anchors) is therefore filtered out during deep crawling. URLPatternFilter already parses urlparse(url).path, so this looks like a miss in _extract_extension rather than intended behaviour.
Expected behaviour
Strip #... and ?... before splitting the path, so page.html?v=2 reports html. URLs without an extension should stay allowed, as they are today. I will open a small PR with regression tests.
- Lingua principale
- Python
- Stelle
- 87.2k
- Fork
- 9.1k
- Merge medio
- 1g 6h
- PR unite (30g)
- 25
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di unclecode/crawl4ai
-
BUG: UserAgentGenerator.generate ignores browser_type and returns a random browser stackForse già presa @HhH666-ux l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: Hardened docker-compose (read_only) keeps full Chromium from starting: crashpad needs a writable ~/.configForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta🐞 Bug 📌 Root caused
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
unclecode/crawl4ai#2494 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[Feature]: Crawl4aiDockerClient has no public option for the API token the 0.9 server requiresAperta⚙ Done ✨ Enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno
-
⚙ Done 🐞 Bug 📌 Root caused
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: PDF images saved with save_images_locally=True come back with an empty src in result.mediaAperta⚙ Done 🐞 Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
unclecode/crawl4ai#2469 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di unclecode/crawl4ai
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
521xueweihan/HelloGitHub#4385 ·
-
🐛 bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
pdm-project/pdm#4012 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
pollen-robotics/reachy_mini_conversation_app#611 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 91/100
aws-samples/sample-per-model-bedrock#913 ·
I maintainer di solito rispondono entro 1 giorno
-
lesson-submission pending-review
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
Ikalus1988/MisakaNet#5115 ·
I maintainer di solito rispondono entro 1 giorno