Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
URLPatternFilter("*.tar.gz")rejectshttps://example.com/archive.tar.gz, whileURLPatternFilter("*.html")acceptshttps://example.com/html. The suffix fast path keeps only the final extension segment of the URL and removes the pattern's literal dot.Keep the dot in the stored suffix and match the complete URL path suffix. Query strings and fragments remain excluded, and reverse filters and lists of suffix patterns retain their behavior.
List of files changed and why
crawl4ai/deep_crawling/filters.py: preserve the literal suffix and usestr.endswithfor matching (two runtime lines changed).tests/unit/test_url_pattern_suffix.py: cover multi-part extensions, extensionless filenames, reverse filters, query/fragment handling, case sensitivity, and combined suffix patterns.How Has This Been Tested?
Python 3.12.14, Linux; editable install with pytest, pytest-asyncio, Black, the PDF extra, and Playwright Chromium installed locally.
python -m pytest tests/unit -q -k 'not test_seeder_client_has_no_proxy_by_default and not test_cache_validator_client_has_no_proxy_by_default': 224 passed, 6 skipped, 2 deselected. This includes the existing local HTTPS/browser tests. The two excluded tests assume no ambient HTTP proxy; both also fail on unchanged base2efccccin this proxy-configured environment. One existing Pydantic serialization warning remains.git diff --checkpass.The full repository suite and external-service/LLM integrations were not run. No model API requests were made.
Checklist:
AI assistance: this change and its tests were prepared with Codex.