Classes

The following classes are available globally.

Browser

  • The browser used to perform the web scraping.

    This class encapsulates the webview and its delegates, providing an closure based API.

    See more

    Declaration

    Swift

    public class Browser : NSObject, WKNavigationDelegate, WKScriptMessageHandler

StepRunner

  • The StepRunner is the engine that runs the steps in the pipeline.

    Once initialized, call the run() method to execute the steps, and observe the state property to be notified of progress and status.

    See more

    Declaration

    Swift

    public class StepRunner

AsyncProcessStep

  • Step that performs some async processing, can update the model dictionary, and can be used to drive control flow of the steps.

    See more

    Declaration

    Swift

    public class AsyncProcessStep : Step
  • Step that runs some script which will return a result asynchronously via SwiftScraper.postMessage().

    The StepFlowResult returned by the handler can be used to drive control flow of the steps.

    See more

    Declaration

    Swift

    public class AsyncScriptStep : ScriptStep

DownloadStep

  • Step that downloads a file from a given URL and returns the contents

    The StepFlowResult returned by the handler can be used to drive control flow of the steps.

    See more

    Declaration

    Swift

    @available(iOS 14.5, macOS 11.3, *)
    public class DownloadStep : NSObject, Step
    extension DownloadStep: WKDownloadDelegate
  • Step that loads a new page.

    See more

    Declaration

    Swift

    public class OpenPageStep : Step, NavigableStep
  • Step that runs some script, which will result in a new page being loaded.

    See more

    Declaration

    Swift

    public class PageChangeStep : Step, NavigableStep

ProcessStep

  • Step that performs some processing, can update the model dictionary, and can be used to drive control flow of the steps.

    See more

    Declaration

    Swift

    public class ProcessStep : Step

ScriptStep