Skip to content

Commit 6d1d3dc

Browse files
committed
docs: ues english anchors for headings
1 parent 8ab0592 commit 6d1d3dc

38 files changed

+90
-90
lines changed

docs/about/old-docs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# Old version documentation
1+
# Old version document
22

33
v9.0.0 version: https://github.com/coder-hxl/x-crawl/blob/v9.0.0/docs/cn.md

docs/cn/about/announcements.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 注意事项
1+
# 注意事项 {#precautions}
22

33
- x-crawl 仅供合法用途,禁止使用该工具进行任何违法活动,包括但不限于未经授权的数据采集、网络攻击、隐私侵犯等行为。
44
- 在进行数据采集之前,请确保您已经获得了目标网站的明确授权,并遵守其 robots.txt 文件规定以及使用条款。

docs/cn/about/community.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 社区
1+
# 社区 {#community}
22

33
- **Discord 聊天:** 通过 [Discord](https://discord.gg/SF7aaebg4E) 与其他 x-crawl 用户实时提问和讨论(提前了解关于 x-crawl 的动态)。
44
- **GitHub 讨论:** 使用 [GitHub 讨论](https://github.com/coder-hxl/x-crawl/discussions) 来进行留言板式的问题和讨论。

docs/cn/about/faq.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# 常见问题
1+
# 常见问题 {#common-problem}
22

3-
## crawlPage API 跟 puppeteer 的关系
3+
## crawlPage API 跟 puppeteer 的关系 {#the-relationship-between-crawlpage-api-and-puppeteer}
44

55
crawlPage API 内置了 [puppeteer](https://github.com/puppeteer/puppeteer) ,您只需要传入一些配置选项即可让 x-crawl 帮助您简化操作,并拿到完好无损的 Brower 实例和 Page 实例,x-crawl 并不会对其重写。
66

7-
## 使用 crawlPage API 造成程序崩溃
7+
## 使用 crawlPage API 造成程序崩溃 {#using-crawlpage-api-causes-the-program-to-crash}
88

99
如果你需要在一个 crawlPage 爬取很多页面,建议在每个页面爬下来后,用 [onCrawlItemComplete 生命周期函数](/cn/guide/crawl-page#生命周期) 来处理每个目标的结果并关闭 page 实例,如果不进行关闭操作,则可能因开启的 page 过多而造成程序崩溃(跟自身设备性能有关)。
1010

docs/cn/about/old-docs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# 旧版本文档
1+
# 旧版本文档 {#old-version-document}
22

33
v9.0.0 版本:https://github.com/coder-hxl/x-crawl/blob/v9.0.0/docs/cn.md

docs/cn/about/releases.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# 版本发布
1+
# 版本发布 {#version-release}
22

33
完整的过往发布记录可以在 [GitHub](https://github.com/coder-hxl/x-crawl/blob/main/CHANGELOG.md) 查阅。

docs/cn/api/crawl-data.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
crawl 是爬虫实例的方法,通常用于爬取 API ,可获取 JSON 数据等等。
44

5-
## 类型
5+
## 类型 {#type}
66

77
crawlData API 是一个函数。类型是 [重载函数](https://www.typescriptlang.org/docs/handbook/2/functions.html#function-overloads) 可以通过不同的配置参数调用该函数(在类型方面)。
88

@@ -33,7 +33,7 @@ type crawlData = {
3333
3434
- 查看 [CrawlDataSingleResult](/cn/type/crawl-data#crawldatasingleresult) 类型
3535
36-
## 示例
36+
## 示例 {#example}
3737
3838
```js
3939
import { createCrawl } from 'x-crawl'
@@ -56,7 +56,7 @@ crawlApp
5656
})
5757
```
5858

59-
## 配置
59+
## 配置 {#configuration}
6060

6161
一共有 4 种:
6262

@@ -65,7 +65,7 @@ crawlApp
6565
- 混合目标数组配置 - (string | CrawlDataDetailTargetConfig)[]
6666
- 进阶配置 - CrawlDataAdvancedConfig
6767

68-
### 简单目标配置 - string
68+
### 简单目标配置 - string {#simple-target-configuration---string}
6969

7070
这是简单目标配置。如果你只想单纯爬一下这个数据,并且该接口是 GET 方式的,可以试试这种写法:
7171

@@ -81,7 +81,7 @@ crawlApp.crawlData('https://www.example.com/api').then((res) => {})
8181
拿到的 res 将是一个对象。
8282
:::
8383

84-
### 详细目标配置 - CrawlDataDetailTargetConfig
84+
### 详细目标配置 - CrawlDataDetailTargetConfig {#detailed-target-configuration---crawldatadetailtargetconfig}
8585

8686
这是详细目标配置。如果你想爬一下这个数据,并且需要失败重试之类的,可以试试这种写法:
8787

@@ -105,7 +105,7 @@ crawlApp
105105
拿到的 res 将是一个对象。
106106
:::
107107

108-
### 混合目标数组配置 - (string | CrawlDataDetailTargetConfig)[]
108+
### 混合目标数组配置 - (string | CrawlDataDetailTargetConfig)[] {#mixed-target-array-configuration---(string-|-CrawlDataDetailTargetConfig)[]}
109109

110110
这是混合目标数组配置。如果你想爬取多个数据,并且有些数据需要失败重试之类的,可以试试这种写法:
111111

@@ -128,7 +128,7 @@ crawlApp
128128
拿到的 res 将是一个数组,里面是对象。
129129
:::
130130

131-
### 进阶配置 - CrawlDataAdvancedConfig
131+
### 进阶配置 - CrawlDataAdvancedConfig {#advanced-configuration---crawldataadvancedconfig}
132132

133133
这是进阶配置,targets 是混合目标数组配置。如果你想爬取多个数据,并且爬取目标配置(proxy、cookies、重试等等)不想重复写,还需要间隔时间、设备指纹以及生命周期等等,可以试试这种写法:
134134

docs/cn/api/crawl-file.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
crawlFile 是爬虫实例的方法,通常用于爬取文件,可获取图片、pdf 文件等等。
44

5-
## 类型
5+
## 类型 {#type}
66

77
crawlFile API 是一个函数。类型是 [重载函数](https://www.typescriptlang.org/docs/handbook/2/functions.html#function-overloads) 可以通过不同的配置参数调用该函数(在类型方面)。
88

@@ -29,7 +29,7 @@ type crawlFile = {
2929
3030
- 查看 [CrawlFileSingleResult](/cn/type/crawl-file#crawlfilesingleresult) 类型
3131
32-
## 示例
32+
## 示例 {#example}
3333
3434
```js
3535
import { createCrawl } from 'x-crawl'
@@ -53,7 +53,7 @@ crawlApp
5353
.then((res) => {})
5454
```
5555

56-
## 配置
56+
## 配置 {#configuration}
5757

5858
一共有 4 种:
5959

@@ -62,7 +62,7 @@ crawlApp
6262
- 详细目标数组配置 - (string | CrawlFileDetailTargetConfig)[]
6363
- 进阶配置 - CrawlFileAdvancedConfig
6464

65-
### 简单目标配置 - string
65+
### 简单目标配置 - string {#simple-target-configuration---string}
6666

6767
这是简单目标配置。如果你只想单纯爬一下这个文件,可以试试这种写法:
6868

@@ -78,7 +78,7 @@ crawlApp.crawlFile('https://www.example.com/file').then((res) => {})
7878
拿到的 res 将是一个对象。
7979
:::
8080

81-
### 详细目标配置 - CrawlFileDetailTargetConfig
81+
### 详细目标配置 - CrawlFileDetailTargetConfig {#detailed-target-configuration---crawldatadetailtargetconfig}
8282

8383
这是详细目标配置。如果你想爬一下这个文件,并且需要失败重试之类的,可以试试这种写法:
8484

@@ -104,7 +104,7 @@ crawlApp
104104
拿到的 res 将是一个对象。
105105
:::
106106

107-
### 混合目标数组配置 - (string | CrawlFileDetailTargetConfig)[]
107+
### 混合目标数组配置 - (string | CrawlFileDetailTargetConfig)[] {#mixed-target-array-configuration---(string-|-CrawlDataDetailTargetConfig)[]}
108108

109109
这是混合目标数组配置。如果你想爬取多个文件,并且有些数据需要失败重试之类的,可以试试这种写法:
110110

@@ -128,7 +128,7 @@ crawlApp
128128
拿到的 res 将是一个数组,里面是对象。
129129
:::
130130

131-
### 进阶配置 - CrawlFileAdvancedConfig
131+
### 进阶配置 - CrawlFileAdvancedConfig {#advanced-configuration---crawldataadvancedconfig}
132132

133133
这是进阶配置,targets 是混合目标数组配置。如果你想爬取多个数据,并且爬取目标配置(proxy、storeDir、重试等等)不想重复写,还需要间隔时间、设备指纹以及生命周期等等,可以试试这种写法:
134134

docs/cn/api/crawl-html.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
crawlHTML 是爬虫实例的方法,通常用于爬取静态 HTML 页面。
44

5-
## 类型
5+
## 类型 {#type}
66

77
crawlHTML API 是一个函数。类型是 [重载函数](https://www.typescriptlang.org/docs/handbook/2/functions.html#function-overloads) 可以通过不同的配置参数调用该函数(在类型方面)。
88

@@ -29,7 +29,7 @@ type crawlHTML = {
2929
3030
- 查看 [CrawlHTMLSingleResult](/cn/type/crawl-html#crawlhtmlsingleresult) 类型
3131
32-
## 示例
32+
## 示例 {#example}
3333
3434
```js
3535
import { createCrawl } from 'x-crawl'
@@ -40,7 +40,7 @@ const crawlApp = createCrawl()
4040
crawlApp.crawlHTML('https://www.example.com').then((res) => {})
4141
```
4242

43-
## 配置
43+
## 配置 {#configuration}
4444

4545
一共有 4 种:
4646

@@ -49,7 +49,7 @@ crawlApp.crawlHTML('https://www.example.com').then((res) => {})
4949
- 混合目标数组配置 - (string | CrawlHTMLDetailTargetConfig)[]
5050
- 进阶配置 - CrawlHTMLAdvancedConfig
5151

52-
### 简单目标配置 - string
52+
### 简单目标配置 - string {#simple-target-configuration---string}
5353

5454
这是简单目标配置。如果你只想单纯爬一下这个静态 HTML 页面,可以试试这种写法:
5555

@@ -65,7 +65,7 @@ crawlApp.crawlHTML('https://www.example.com').then((res) => {})
6565
拿到的 res 将是一个对象。
6666
:::
6767

68-
### 详细目标配置 - CrawlHTMLDetailTargetConfig
68+
### 详细目标配置 - CrawlHTMLDetailTargetConfig {#detailed-target-configuration---crawldatadetailtargetconfig}
6969

7070
这是详细目标配置。如果你想爬一下这个静态 HTML 页面,并且需要失败重试之类的,可以试试这种写法:
7171

@@ -89,7 +89,7 @@ crawlApp
8989
拿到的 res 将是一个对象。
9090
:::
9191

92-
### 混合目标数组配置 - (string | CrawlHTMLDetailTargetConfig)[]
92+
### 混合目标数组配置 - (string | CrawlHTMLDetailTargetConfig)[] {#mixed-target-array-configuration---(string-|-CrawlDataDetailTargetConfig)[]}
9393

9494
这是混合目标数组配置。如果你想爬取多个静态 HTML 页面,并且有些静态 HTML 页面需要失败重试之类的,可以试试这种写法:
9595

@@ -112,7 +112,7 @@ crawlApp
112112
拿到的 res 将是一个数组,里面是对象。
113113
:::
114114

115-
### 进阶配置 - CrawlHTMLAdvancedConfig
115+
### 进阶配置 - CrawlHTMLAdvancedConfig {#advanced-configuration---crawldataadvancedconfig}
116116

117117
这是进阶配置,targets 是混合目标数组配置。如果你想爬取多个静态 HTML 页面,并且爬取目标配置(proxy、cookies、重试等等)不想重复写,还需要间隔时间、设备指纹以及生命周期等等,可以试试这种写法:
118118

docs/cn/api/crawl-page.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
crawlPage 是爬虫实例的方法,通常用于爬取动态页面。
44

5-
## 类型
5+
## 类型 {#type}
66

77
crawlPage API 是一个函数。类型是 [重载函数](https://www.typescriptlang.org/docs/handbook/2/functions.html#function-overloads) 可以通过不同的配置参数调用该函数(在类型方面)。
88

@@ -29,7 +29,7 @@ type crawlPage = {
2929
3030
- 查看 [CrawlPageSingleResult](/cn/type/crawl-page#crawlpagesingleresult) 类型
3131
32-
## 示例
32+
## 示例 {#example}
3333
3434
```js
3535
import { createCrawl } from 'x-crawl'
@@ -45,7 +45,7 @@ crawlApp.crawlPage('https://www.example.com').then((res) => {
4545
})
4646
```
4747

48-
## 配置
48+
## 配置 {#configuration}
4949

5050
一共有 4 种:
5151

@@ -54,7 +54,7 @@ crawlApp.crawlPage('https://www.example.com').then((res) => {
5454
- 混合目标数组配置 - (string | CrawlPageDetailTargetConfig)[]
5555
- 进阶配置 - CrawlPageAdvancedConfig
5656

57-
### 简单目标配置 - string
57+
### 简单目标配置 - string {#simple-target-configuration---string}
5858

5959
这是简单目标配置。如果你只想单纯爬一下这个页面,可以试试这种写法:
6060

@@ -70,7 +70,7 @@ crawlApp.crawlPage('https://www.example.com').then((res) => {})
7070
拿到的 res 将是一个对象。
7171
:::
7272

73-
### 详细目标配置 - CrawlPageDetailTargetConfig
73+
### 详细目标配置 - CrawlPageDetailTargetConfig {#detailed-target-configuration---crawldatadetailtargetconfig}
7474

7575
这是详细目标配置。如果你想爬一下这个页面,并且需要失败重试之类的,可以试试这种写法:
7676

@@ -94,7 +94,7 @@ crawlApp
9494
拿到的 res 将是一个对象。
9595
:::
9696

97-
### 混合目标数组配置 - (string | CrawlPageDetailTargetConfig)[]
97+
### 混合目标数组配置 - (string | CrawlPageDetailTargetConfig)[] {#mixed-target-array-configuration---(string-|-CrawlDataDetailTargetConfig)[]}
9898

9999
这是混合目标数组配置。如果你想爬取多个页面,并且有些页面需要失败重试之类的,可以试试这种写法:
100100

@@ -117,7 +117,7 @@ crawlApp
117117
拿到的 res 将是一个数组,里面是对象。
118118
:::
119119

120-
### 进阶配置 - CrawlPageAdvancedConfig
120+
### 进阶配置 - CrawlPageAdvancedConfig {#advanced-configuration---crawldataadvancedconfig}
121121

122122
这是进阶配置,targets 是混合目标数组配置。如果你想爬取多个页面,并且爬取目标配置(proxy、cookies、重试等等)不想重复写,还需要间隔时间、设备指纹以及生命周期等等,可以试试这种写法:
123123

0 commit comments

Comments
 (0)