Skip to content

Add Scrapfly plugin (scrapfly/scrapfly) 0.0.1 - #4102

Draft
HishamM1 wants to merge 3 commits into
langgenius:mainfrom
HishamM1:add-scrapfly-0.0.1
Draft

HishamM1 wants to merge 3 commits into
langgenius:mainfrom
HishamM1:add-scrapfly-0.0.1

Conversation

@HishamM1

@HishamM1 HishamM1 commented Dec 3, 2026 •

Copy link
Copy Markdown

Plugin Submission

Plugin information

Submission type

  • New plugin
  • Version update

What changed

New plugin for Scrapfly, a web scraping API. It adds two tools:

  • Scrape web page: fetches a URL and returns it as Markdown, text, clean HTML or raw HTML. Options: JavaScript rendering, anti-bot bypass, proxy country.
  • Screenshot web page: returns a PNG of the visible area or the full page.

Both tools use the official Scrapfly Python SDK with the user's Scrapfly API key. When the URL points to a file (PDF, image), the scrape tool returns it as a blob with its real content type, and its JSON result says format: binary, content_type and size. For text, the JSON holds format: text, the content_type of the output and its length.

Risk level

  • Low risk
  • Medium risk
  • High risk

The plugin only calls the documented Scrapfly API (https://api.scrapfly.io), but the URL it scrapes comes from the user or the model, and Scrapfly fetches it through its proxies and browsers. That is arbitrary URL fetching, so I picked the higher level.

Required checks

  • I have read and followed the Marketplace submission requirements.
  • I have read and comply with the Plugin Development Guidelines.
  • I tested this plugin on Dify Community Edition and Dify Cloud, or documented any limitation below.
  • The package contains only files needed at runtime.
  • The package does not contain secrets, local credentials, .env files, .git directories, virtual environments, caches, logs, or IDE files.
  • The package does not contain executables or bundled binaries, or I explained why they are required below.
  • The plugin README includes setup steps, usage instructions, required APIs or credentials, connection requirements, and the source repository link.
  • The plugin includes PRIVACY.md or a hosted privacy policy, and manifest.yaml references it.
  • All user-facing text is primarily in English, with any localized README files following the i18n guidance.

Security and privacy notes

  • Arbitrary URL fetching: the target URL is user or model input. The request is made by the Scrapfly API, not from the Dify host. The plugin itself only connects to https://api.scrapfly.io.
  • The API key is a secret-input provider credential, and the credential check rejects a missing or empty key. Errors come from the SDK, which masks the key in every message, and each error tells the user and the model what to do next (fix the key, check the plan, wait and retry, or retry with JavaScript rendering).
  • Every request has a timeout set by the SDK.
  • The plugin stores no data. See PRIVACY.md.

Local validation

pytest -q
59 passed (58 offline tests with the SDK mocked, 1 live test against the real API)

dify-plugin plugin package ./scrapfly-dify-plugin
INFO plugin packaged successfully

Package contents: manifest, README, PRIVACY.md, icons, main.py, provider/, tools/, pyproject.toml, requirements.txt (15 files, no tests, caches or binaries).

The plugin repo runs the tests and the package build in CI on every push: https://github.com/scrapfly/scrapfly-dify-plugin/actions/runs/47306620278

Reviewer notes

The tool code was tested against the live Scrapfly API, but the plugin has not been installed in a Dify Community Edition or Dify Cloud workspace yet, so that box is unchecked.

@crazywoola

Copy link
Copy Markdown
Member

Thank you for submitting the Scrapfly plugin. The latest validation runs found blocking issues in scrapfly/scrapfly/scrapfly-0.0.1.difypkg:

Non-blocking warnings: httpx>=0.27.0 has only a lower-bound version constraint, and adding api.scrapfly.io to network.domains in the manifest would match what the static scan detected.

Please rebuild the package with these fixes and push it so validation can run again. The latest PR Risk Label run also did not start successfully, so a new revision will need a successful apply-risk-label job as well.

@HishamM1
HishamM1 marked this pull request as draft December 4, 2026 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants