Classes
The following classes are available globally.
-
The browser used to perform the web scraping.
This class encapsulates the webview and its delegates, providing an closure based API.
See moreDeclaration
Swift
public class Browser : NSObject, WKNavigationDelegate, WKScriptMessageHandler
-
The
StepRunneris the engine that runs the steps in the pipeline.Once initialized, call the
See morerun()method to execute the steps, and observe thestateproperty to be notified of progress and status.Declaration
Swift
public class StepRunner
-
Step that runs some script which will return a result asynchronously via
SwiftScraper.postMessage().The
See moreStepFlowResultreturned by thehandlercan be used to drive control flow of the steps.Declaration
Swift
public class AsyncScriptStep : ScriptStep
-
Step that downloads a file from a given URL and returns the contents
The
See moreStepFlowResultreturned by thehandlercan be used to drive control flow of the steps.Declaration
Swift
@available(iOS 14.5, macOS 11.3, *) public class DownloadStep : NSObject, Stepextension DownloadStep: WKDownloadDelegate
-
Step that runs some JavaScript which will return a result immediately from the JavaScript function.
The
See moreStepFlowResultreturned by thehandlercan be used to drive control flow of the steps.Declaration
Swift
public class ScriptStep : Step
View on GitHub
Install in Dash
Classes Reference