Crawl
Extracts links from the supplied task’s downloaded page and creates child download tasks, automatically following pending server-side results.
Syntax
wds.Crawl(@downloadTask, @selector, @attributeName)
Arguments
| Name | Type | Description |
|---|---|---|
| @downloadTask | wds.DownloadTask | Supplies the task ID and server connection. A null task returns no rows; a task with an error is returned unchanged. |
| @selector | string | Selects link-bearing elements. Use CSS: <selector>, XPATH: <selector>, or * for all anchor elements. |
| @attributeName | string or null | Optional attribute used to obtain a link. Use val for inner text; null or empty uses href. |
Returns
TABLE (Task wds.DownloadTask) — subsequent wds.DownloadTask values with URLs matched by the selector.
Data Contracts
DownloadTask
Represents a download task that can be passed to MSSQL CLR functions.
| Name | Type | Description |
|---|---|---|
| Server | ServerConfig | Server connection associated with the task. |
| Id | string | Download task identifier. |
| Url | string | Download task URL. |
Validation requires Server, Id, and Url.
ServerConfig
API server configuration.
| Name | Type | Description |
|---|---|---|
| Uri | Uri | API server URI. |
Parse accepts wds://user:password@host:port?https=false, requires the wds scheme, and produces an HTTP URI unless https=true is supplied. Validation requires a URI.