Skip to content

feat: allow custom fetch injection for crawling (proxy support)#15

Merged
kimhongyeon merged 1 commit into
mainfrom
feature/custom-fetch
Feb 12, 2026
Merged

feat: allow custom fetch injection for crawling (proxy support)#15
kimhongyeon merged 1 commit into
mainfrom
feature/custom-fetch

Conversation

@kimhongyeon

@kimhongyeon kimhongyeon commented Feb 12, 2026

Copy link
Copy Markdown
Member

Summary

This PR adds support for injecting a custom fetch implementation into the crawling flow, enabling proxy-based or otherwise customized HTTP requests. When provided, the crawler uses the custom fetch function for all page retrieval; otherwise it falls back to the global fetch.

Changes

  • Add an optional customFetch field to the crawling configuration.
  • Update the HTML-fetching utility to use customFetch when available (fallback to global fetch).
  • Propagate customFetch through the crawling chain for both list and detail page requests.

Breaking Changes

  • None
  • If any, describe migration steps:
    • N/A

Checklist

  • I followed the Code of Conduct (see CODE_OF_CONDUCT.md)
  • I ran: npm run lint npm run typecheck npm run build npm test
  • Tests added/updated; coverage remains 100%
  • Docs/README updated if needed
  • No external side effects (network/file/process/time) in tests — use mocks

Related Issues

Closes #

- Add `customFetch` option in crawling configuration to allow proxy-based fetch.
- Update `getHtmlFromUrl` to use the provided `customFetch` if available.
- Refactor crawling chain to pass `customFetch` when fetching list and detail URLs.
@kimhongyeon kimhongyeon self-assigned this Feb 12, 2026
@kimhongyeon kimhongyeon requested a review from haxero as a code owner February 12, 2026 21:50
@kimhongyeon kimhongyeon added the enhancement New feature or request label Feb 12, 2026
@kimhongyeon kimhongyeon merged commit 6484d5a into main Feb 12, 2026
1 check passed
@kimhongyeon kimhongyeon deleted the feature/custom-fetch branch February 12, 2026 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant