GetWebCaptureCommand
文档结构
描述
从选定文档 Catalog 的 /SpiderInfo /C 数组读取一个 ISO Web Capture 命令字典
语法
Delphi
Function GetWebCaptureCommand(Index: Integer; Out Command: TPDFlibWebCaptureCommand): Integer;参数
| Index | 要从目录 /SpiderInfo /C 数组读取的命令字典索引(从 1 开始) |
|---|---|
| Command | 接收命令元数据的输出记录:URL、Levels、Flags、PostData、ContentType 和 Headers。函数返回 0 时重置为默认值 |
返回值
| 0 | 未读取到有效命令 |
|---|---|
| 1 | Command 包含所请求的元数据 |
失败行为
当 Index 超出从 1 开始的命令范围、所索引对象不是命令字典,或其必需的 /URL 字符串缺失或为空时,返回 0。失败时 Command 会重置为空 URL、Levels 1、Flags 0 和空的可选字符串
备注
Index 从 1 开始。缺失的 /L 和 /F 条目保留默认值 1 和 0。PostData 接受 PDF 字符串或解码后的 PDF 流,而 URL、ContentType 和 Headers 从 PDF 字符串读取。该 API 只读取 ISO Web Capture 命令元数据,不会抓取或爬取记录的 URL
另请参阅
TPDFlibWebCaptureCommand, GetWebCaptureCommandCount, AddWebCaptureCommand, ClearWebCaptureCommands