Skip to content

Repository files navigation

How to Handle CAPTCHA in a Weather Data Collection Agent with AutoGen and CapSolver

Normalize bounded public weather observations with a bounded AutoGen workflow.

English cover for weather data collection with AutoGen

English · 简体中文 · 日本語 · Español · Português · 한국어

Introduction

When developers use AutoGen for weather data collection, CAPTCHA challenges can interrupt the workflow before the agent records the permitted data. This repository demonstrates how to connect AutoGen with CapSolver, preserve the business context, and continue only within bounded, owned, mock, or explicitly authorized targets.

The default path is deterministic and offline, so reviewers can understand the business outcome before enabling any live integration.

Problem

A challenged page must not be interpreted as a valid business result. The workflow emits challenge_detected, uses a solver adapter, resumes once, and otherwise stops with a reviewable reason.

Features

  • Scenario-first observation model
  • AutoGen integration boundary
  • Mock-first solver lifecycle
  • Allowlisted hosts and one bounded resume
  • Redacted JSON output

How It Works

  1. Accept an allowlisted target and scenario identifier.
  2. Classify the mock browser observation.
  3. Route a challenge through the solver adapter.
  4. Resume once and normalize the result.
  5. Emit a minimal audit record.

The adapter follows the official createTask API concept and getTaskResult API concept.

Quick Start

python -m unittest discover -s tests -v
PYTHONPATH=src python examples/mock_workflow.py

Project Structure

src/scenario_agent/  workflow and adapter
examples/            offline demonstration
tests/               unit and policy checks
docs/                localized guides
assets/              shared English cover

Testing

Tests cover a successful bounded resume and rejection of a non-allowlisted target.

Responsible Use

Use only public data, owned systems, or targets for which you have explicit authorization. Respect terms, rate limits, purpose limitation, field minimization, retention limits, and stop conditions. Do not use this example for private or restricted data, credential access, detection evasion, or unbounded collection. Personal, financial, employment, travel, property, or contact data requires a documented lawful purpose and human review.

Conclusion

This repository connects a recognizable weather data collection problem to a testable AutoGen workflow. Developer sharing CapSolver integration examples. The final product reference is CapSolver.

License

MIT

About

Normalize bounded public weather observations with AutoGen and CapSolver.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages