mirror of
https://github.com/reconurge/flowsint.git
synced 2026-07-16 09:02:57 -05:00
[PR #186] feat(enrichers): make domain_to_website extractions opt-out #4056
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/reconurge/flowsint/pull/186
Author: @rachit367
Created: 6/9/2026
Status: 🔄 Open
Base:
main← Head:feat/website-extraction-params📝 Commits (1)
5a6b241feat(enrichers): make domain_to_website extractions opt-out📊 Changes
2 files changed (+276 additions, -94 deletions)
View changed files
📝
flowsint-enrichers/src/flowsint_enrichers/domain/to_website.py(+129 -94)➕
flowsint-enrichers/tests/enrichers/test_domain_to_website.py(+147 -0)📄 Description
What
Adds optional toggles to
domain_to_websiteso users can skip the heavier extractions (page content, technologies, headers) for faster, lighter scans.Closes #90
Why
From the issue thread:
domain_to_website"extracts a lot and can be slow." Today it unconditionally fetches the page and runs full text extraction (up to 5000 chars), technology detection, and header capture on every run — even when a user only wants liveness + title. This follows the configurable-transformer convention from #60 (safe defaults, opt-in depth).Changes
get_params_schema()with threeselectparams —extract_content,extract_technologies,extract_headers— all defaulting to"true", so existing behavior is unchanged. Setting any to"false"skips that work.title,description,status_code, andactiveare always captured (they're cheap), so disabling the heavy options still gives a useful result.scan()are collapsed into afor scheme in ("https", "http")loop plus a_build_website_data()helper (so the param-gating lives in one place, not duplicated). Header selection moved to_extract_headers(). Behavior is preserved: HTTPS is tried first, HTTP is the fallback, and a failed/≥400 fetch yields an inactive Website. Also drops two unused imports.Testing
New tests (requests mocked, no network): params schema shape + safe defaults, default full extraction (regression), each toggle off independently, all-heavy-off still keeping core fields, and the request-failure → inactive path.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.