Skip to content

Commit 8a24b5c

Browse files
committed
Update api docs
1 parent 7315e60 commit 8a24b5c

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

api-manual/api/crawler.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
| [crawler.domainInclude](#domaininclude) |domainInclude 是一个选项函数,用于指定爬虫时的域名白名单 domain允许使用glob语法,例如*.example.com |
1616
| [crawler.forbiddenFromParent](#forbiddenfromparent) |forbiddenFromParent 是一个选项函数,用于指定爬虫时的是否禁止从根路径发起请求,默认为false 对于一个起始URL,如果其并不是从根路径开始且没有禁止从根路径发起请求,那么爬虫会从其根路径开始爬取 |
1717
| [crawler.header](#header) |header 是一个选项函数,用于指定爬虫时的请求头 |
18+
| [crawler.httpsToHttpFallback](#httpstohttpfallback) ||
1819
| [crawler.jsParser](#jsparser) |jsParser 是一个选项函数,用于指定爬虫时是否进行对于JS的代码解析。 填写该选项默认开启,也可以传入false强制关闭。 |
1920
| [crawler.maxDepth](#maxdepth) |maxDepth 是一个选项函数,用于指定爬虫时的最大深度,默认为5 |
2021
| [crawler.maxRedirect](#maxredirect) |maxRedirect 是一个选项函数,用于指定爬虫时的最大重定向次数,默认为5 |
@@ -29,6 +30,7 @@
2930
| [crawler.urlRegexpExclude](#urlregexpexclude) |urlRegexpExclude 是一个选项函数,用于指定爬虫时的URL正则黑名单 |
3031
| [crawler.urlRegexpInclude](#urlregexpinclude) |urlRegexpInclude 是一个选项函数,用于指定爬虫时的URL正则白名单 |
3132
| [crawler.userAgent](#useragent) |userAgent 是一个选项函数,用于指定爬虫时的User-Agent |
33+
| [crawler.verifyCertificate](#verifycertificate) ||
3234

3335

3436
## 函数定义
@@ -391,6 +393,26 @@ crawler.Start("https://example.com", crawler.header("User-Agent", "yaklang-crawl
391393
| r1 | `ConfigOpt` | |
392394

393395

396+
### httpsToHttpFallback
397+
398+
#### 详细描述
399+
400+
401+
#### 定义
402+
403+
`httpsToHttpFallback(enable bool) ConfigOpt`
404+
405+
#### 参数
406+
|参数名|参数类型|参数解释|
407+
|:-----------|:---------- |:-----------|
408+
| enable | `bool` | |
409+
410+
#### 返回值
411+
|返回值(顺序)|返回值类型|返回值解释|
412+
|:-----------|:---------- |:-----------|
413+
| r1 | `ConfigOpt` | |
414+
415+
394416
### jsParser
395417

396418
#### 详细描述
@@ -750,3 +772,23 @@ crawler.Start("https://example.com", crawler.userAgent("yaklang-crawler"))
750772
| r1 | `ConfigOpt` | |
751773

752774

775+
### verifyCertificate
776+
777+
#### 详细描述
778+
779+
780+
#### 定义
781+
782+
`verifyCertificate(b bool) ConfigOpt`
783+
784+
#### 参数
785+
|参数名|参数类型|参数解释|
786+
|:-----------|:---------- |:-----------|
787+
| b | `bool` | |
788+
789+
#### 返回值
790+
|返回值(顺序)|返回值类型|返回值解释|
791+
|:-----------|:---------- |:-----------|
792+
| r1 | `ConfigOpt` | |
793+
794+

api-manual/api/simulator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ htmlChangeMode|(simulator.loginDetectMode) 1|
77
leaklessDefault|(simulator.LeaklessMode) 0|
88
leaklessOff|(simulator.LeaklessMode) -1|
99
leaklessOn|(simulator.LeaklessMode) 1|
10-
simple|(map[string]interface {}) map[string]interface {}{"CreateBrowser": (func(...simple.BrowserConfigOpt) (*simple.VBrowser, error))(0x360c4e0), "bodyModifyTarget": "body", "bodyReplaceTarget": "bodyReplace", "createBrowser": (func(...simple.BrowserConfigOpt) (*simple.VBrowser, error))(0x360c4e0), "exePath": (func(string) simple.BrowserConfigOpt)(0x360bae0), "headersModifyTarget": "headers", "headless": (func(bool) simple.BrowserConfigOpt)(0x360bde0), "hijack": (func(bool) simple.BrowserConfigOpt)(0x360be60), "hostModifyTarget": "host", "leakless": (func(bool) simple.BrowserConfigOpt)(0x360c460), "noSandBox": (func(bool) simple.BrowserConfigOpt)(0x360bd60), "proxy": (func(string, ...string) simple.BrowserConfigOpt)(0x360bbc0), "requestModify": (func(string, simple.ModifyTarget, interface {}) simple.BrowserConfigOpt)(0x360c160), "responseModify": (func(string, simple.ModifyTarget, interface {}) simple.BrowserConfigOpt)(0x360bee0), "timeout": (func(int) simple.BrowserConfigOpt)(0x360c3e0), "wsAddress": (func(string) simple.BrowserConfigOpt)(0x360ba00)}|
10+
simple|(map[string]interface {}) map[string]interface {}{"CreateBrowser": (func(...simple.BrowserConfigOpt) (*simple.VBrowser, error))(0x360cb40), "bodyModifyTarget": "body", "bodyReplaceTarget": "bodyReplace", "createBrowser": (func(...simple.BrowserConfigOpt) (*simple.VBrowser, error))(0x360cb40), "exePath": (func(string) simple.BrowserConfigOpt)(0x360c140), "headersModifyTarget": "headers", "headless": (func(bool) simple.BrowserConfigOpt)(0x360c440), "hijack": (func(bool) simple.BrowserConfigOpt)(0x360c4c0), "hostModifyTarget": "host", "leakless": (func(bool) simple.BrowserConfigOpt)(0x360cac0), "noSandBox": (func(bool) simple.BrowserConfigOpt)(0x360c3c0), "proxy": (func(string, ...string) simple.BrowserConfigOpt)(0x360c220), "requestModify": (func(string, simple.ModifyTarget, interface {}) simple.BrowserConfigOpt)(0x360c7c0), "responseModify": (func(string, simple.ModifyTarget, interface {}) simple.BrowserConfigOpt)(0x360c540), "timeout": (func(int) simple.BrowserConfigOpt)(0x360ca40), "wsAddress": (func(string) simple.BrowserConfigOpt)(0x360c060)}|
1111
stringMatchMode|(simulator.loginDetectMode) 2|
1212
urlChangeMode|(simulator.loginDetectMode) 0|
1313

0 commit comments

Comments
 (0)