Skip to main content

Documentation Index

Fetch the complete documentation index at: https://www.octoparse.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

The smart decision engine helps Octoparse workflows handle variation in website structure and task behavior. It is useful when a task cannot follow the exact same path on every page or every run. Use smart decision logic when a workflow needs to respond to conditions instead of running the same actions blindly.

What it helps with

Smart decision logic can help with workflows where:
  • Some pages contain optional fields
  • Some results have detail pages while others do not
  • Buttons or pagination controls appear only in certain cases
  • Popups or login states vary
  • Different page layouts require different actions
  • A task needs to skip unavailable elements

Example scenarios

ScenarioSmart decision use
A “Next” button sometimes appearsContinue pagination only when the button exists
Some listings have detail pagesClick into details only when a link is present
A popup appears on some runsClose it when detected, skip the step otherwise
Optional fields are missingContinue extracting other fields without failing the workflow
Different page layouts appearUse alternative actions depending on the page state

How to use it

1

Identify the variation

Find the part of the workflow that does not behave the same every time.
2

Define the condition

Decide what Octoparse should check, such as whether an element exists or whether a page state is present.
3

Set the action path

Configure what should happen when the condition is met and what should happen when it is not.
4

Test multiple cases

Run samples against pages that represent each condition.

Best practices

  • Use smart decisions only where the page genuinely varies.
  • Keep conditions specific and easy to understand.
  • Test both success and fallback paths.
  • Avoid adding unnecessary branches to simple workflows.
  • Recheck the task if the website layout changes.
Smart decision logic improves task resilience, but it does not replace testing. Always verify output across several page examples before running at scale.