Skip to content

feat(fetchers): DuckDuckGo soft-block detection + link decoding (#26 #27)#62

Merged
Liohtml merged 1 commit into
masterfrom
claude/duckduckgo-helpers
Jun 24, 2026
Merged

feat(fetchers): DuckDuckGo soft-block detection + link decoding (#26 #27)#62
Liohtml merged 1 commit into
masterfrom
claude/duckduckgo-helpers

Conversation

@Liohtml

@Liohtml Liohtml commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Summary

New fetchers::search module for two DuckDuckGo HTML-endpoint quirks that silently break naive scrapers:

README documents the limitation with a usage example and recommends Startpage / the Instant Answers API as more reliable.

Test plan

  • 7 unit tests: redirect decode, pass-through (non-DDG + non-/l/), 202 block, homepage-without-results block, real-results not-blocked, non-DDG never blocked
  • cargo test, clippy --all-targets -D warnings, fmt --check green

Closes #26
Closes #27


Generated by Claude Code

Adds a fetchers::search module addressing two DuckDuckGo HTML-endpoint quirks
that silently break naive scrapers:

- #26: is_duckduckgo_blocked() detects DDG's soft-block, where it returns
  HTTP 202 (a nominal success, so Response::is_blocked misses it) carrying its
  homepage instead of results. Kept out of the generic is_blocked to avoid
  false positives on legitimate 202s from other hosts.
- #27: decode_duckduckgo_href() unwraps the //duckduckgo.com/l/?uddg=… redirect
  to the real percent-decoded target URL; non-DDG hrefs pass through unchanged.

README documents the DDG limitation with a usage example and recommends
Startpage / the Instant Answers API as more reliable alternatives.

Closes #26
Closes #27

https://claude.ai/code/session_012RmdaovmNWZVAim4XxCWwn
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Liohtml, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 32 minutes and 44 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 66e06496-50a9-447b-aae6-70b44447e07b

📥 Commits

Reviewing files that changed from the base of the PR and between 512a075 and 80b1a23.

📒 Files selected for processing (3)
  • README.md
  • src/fetchers/mod.rs
  • src/fetchers/search.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/duckduckgo-helpers

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Liohtml Liohtml merged commit 4f06b80 into master Jun 24, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants