feat: add scrapeunblocker plugin#2732
Open
Kontuzijus wants to merge 1 commit into
Open
Conversation
Scrape pages behind anti-bot protections and read Google search results via the ScrapeUnblocker API.
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.
Plugin Information
scrapeunblocker/scrapeunblocker/Submission type
Description
ScrapeUnblocker renders web pages in a real browser behind anti-bot protections
(Cloudflare, DataDome, PerimeterX, Akamai) and returns the result to a Dify
workflow. It is useful when an ordinary HTTP request returns a block page, a
captcha, or an empty shell instead of content.
Two tools:
structured JSON when
parsed_datais set. Supportsproxy_countryforgeo-restricted content.
results (
title,url,description,position).Risk level
This plugin proxies and fetches arbitrary user-supplied URLs, so it falls under
the high-risk category by your review guidelines. Specifically:
ScrapeUnblocker's infrastructure, not by the Dify host, so the target site
sees a ScrapeUnblocker IP.
requests.post(..., timeout=...),default 180s, configurable via the
timeout_secondscredential). Nothing canhang indefinitely.
exception type and the path; HTTP failures raise only the status code and
path. Request headers, which carry the key, are never interpolated into
messages.
PRIVACY.md: the target URL (including itsquery string), the optional country code, the search keyword, and the API key
are what leave the Dify instance; the fetched page content passes through
ScrapeUnblocker's servers. It also warns against putting secrets in target
URLs.
Verification
The client was exercised against the live ScrapeUnblocker API before packaging:
get_page_sourcereturned a fully rendered page (58,917 chars, correct title),search_googlereturned 20 organic results with the documented fields, andvalidate_credentialssucceeded. An invalid key correctly raised a credentialerror, and the test asserted the key does not appear in the error text.
Provider and tool classes were imported against
dify_plugin0.9.x to confirmthe SDK surface used here exists. Package built with
dify plugin package(CLI v0.6.4); the archive contains 14 files and no build artefacts.