feat(index): add crawl source — auto-discover and index all pages on a site#105
Open
aafaq-rashid-comprinno wants to merge 2 commits into
Open
Conversation
…a site New source adapter that BFS-crawls a website from a start URL, follows same-domain links up to a configurable depth/max_pages, and yields each discovered page for the index pipeline. Also fixes a bug in make_source() where Path().expanduser() mangled URLs by collapsing '//' to '/' (e.g. https://x.com → https:/x.com). Usage: source: type: crawl start_url: https://example.com/ max_pages: 50 max_depth: 3 Features: - BFS traversal with configurable depth and page limit - Stays on same domain by default - Auto-filters non-content URLs (feeds, wp-json, assets) - Custom exclude_patterns for site-specific filtering - No new dependencies (stdlib urllib + regex)
|
@aafaq-rashid-comprinno is attempting to deploy a commit to the andylizf's projects Team on Vercel. A member of the Team first needs to authorize it. |
8 tests covering BFS discovery, domain filtering, max_pages/depth limits, exclude_patterns, asset filtering, and URL mangling fix.
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
Adds a
crawlsource type that automatically discovers all pages on a website via BFS link-following.Usage
Then:
This crawls comprinno.net (~150 pages), screenshots every page, embeds all chunks with Qwen3-VL, and builds a searchable FAISS index — fully automated.
Changes (from main only)
index/src/pixelrag_index/sources/crawl.py— BFS crawler with domain filteringsources/__init__.py: RegisterCrawlSourcein SOURCES dictconfig.py: Fix bug wherePath().expanduser()mangled URLs containing://Features
max_pagesandmax_depthlimitsstay_on_domain: true)exclude_patternslist for site-specific filteringurllib+reonly)Tested on comprinno.net
?p=), pagination, date archives