Skip to content

Commit 39e0e73

Browse files
committed
docs: correct the link
1 parent 218982e commit 39e0e73

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+217
-131
lines changed

docs/about/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The crawlPage API has built-in [puppeteer](https://github.com/puppeteer/puppetee
66

77
## Using crawlPage API causes the program to crash
88

9-
If you need to crawl many pages in one crawlPage, it is recommended that after crawling each page, use [onCrawlItemComplete life cycle function] (#onCrawlItemComplete) to process the results of each target and close the page instance. If no shutdown operation is performed, then The program may crash due to too many pages being opened (related to the performance of the device itself).
9+
If you need to crawl many pages in one crawlPage, it is recommended that after crawling each page, use [onCrawlItemComplete life cycle function](/guide/crawl-page#life-cycle) to process the results of each target and close the page instance. If no shutdown operation is performed, then The program may crash due to too many pages being opened (related to the performance of the device itself).
1010

1111
```js{11,12,13,14,15,16,,17,,18,35,36,37,38,39,40}
1212
import { createCrawl } from 'x-crawl'

docs/api/crawl-data.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ type crawlData = {
2626
2727
**Parameter Type:**
2828
29-
- View the [CrawlDataDetailTargetConfig](#CrawlDataDetailTargetConfig) type
30-
- View the [CrawlDataAdvancedConfig](#CrawlDataAdvancedConfig) type
29+
- View the [CrawlDataDetailTargetConfig](/type/crawl-data#crawldatadetailtargetconfig) type
30+
- View the [CrawlDataAdvancedConfig](/type/crawl-data#crawldataadvancedconfig) type
3131
3232
**Return value type:**
3333
34-
- View the [CrawlDataSingleResult](#CrawlDataSingleResult) type
34+
- View the [CrawlDataSingleResult](/type/crawl-data#crawldatasingleresult) type
3535
3636
## Example
3737
@@ -77,7 +77,9 @@ const crawlApp = createCrawl()
7777
crawlApp.crawlData('https://www.example.com/api').then((res) => {})
7878
```
7979

80+
::: tip
8081
The res obtained will be an object.
82+
:::
8183

8284
### Detailed target configuration - CrawlDataDetailTargetConfig
8385

@@ -97,9 +99,11 @@ crawlApp
9799
.then((res) => {})
98100
```
99101

100-
The res obtained will be an object.
102+
For more configuration options, see [CrawlDataDetailTargetConfig](type/crawl-data#crawldatadetailtargetconfig).
101103

102-
For more configuration options, see [CrawlDataDetailTargetConfig](#CrawlDataDetailTargetConfig).
104+
::: tip
105+
The res obtained will be an object.
106+
:::
103107

104108
### Mixed target array configuration - (string | CrawlDataDetailTargetConfig)[]
105109

@@ -118,9 +122,11 @@ crawlApp
118122
.then((res) => {})
119123
```
120124

121-
The res obtained will be an array containing objects.
125+
For more configuration options, see [CrawlDataDetailTargetConfig](type/crawl-data#crawldatadetailtargetconfig).
122126

123-
For more configuration options, see [CrawlDataDetailTargetConfig](#CrawlDataDetailTargetConfig).
127+
::: tip
128+
The res obtained will be an array containing objects.
129+
:::
124130

125131
### Advanced configuration - CrawlDataAdvancedConfig
126132

@@ -144,8 +150,10 @@ crawlApp
144150
.then((res) => {})
145151
```
146152

147-
The res obtained will be an array containing objects.
153+
For more configuration options, see [CrawlDataAdvancedConfig](/cn/type/crawl-data#crawldataadvancedconfig).
148154

149-
For more configuration options, see [CrawlDataAdvancedConfig](#CrawlDataAdvancedConfig).
155+
::: tip
156+
The res obtained will be an array containing objects.
157+
:::
150158

151-
For more information about the results, please view [About the results](#About the results). You can choose it according to the actual situation.
159+
For more information about the results, please view [About the results](/guide/results#about-the-results). You can choose it according to the actual situation.

docs/api/crawl-file.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ type crawlFile = {
2222
2323
**Parameter Type:**
2424
25-
- View the [CrawlFileDetailTargetConfig](#CrawlFileDetailTargetConfig) type
26-
- View the [CrawlFileAdvancedConfig](#CrawlFileAdvancedConfig) type
25+
- View the [CrawlFileDetailTargetConfig](/type/crawl-file#crawlfiledetailtargetconfig) type
26+
- View the [CrawlFileAdvancedConfig](/type/crawl-file#crawlfileadvancedconfig) type
2727
2828
**Return value type:**
2929
30-
- View the [CrawlFileSingleResult](#CrawlFileSingleResult) type
30+
- View the [CrawlFileSingleResult](/type/crawl-file#crawlfilesingleresult) type
3131
3232
## Example
3333
@@ -74,7 +74,9 @@ const crawlApp = createCrawl()
7474
crawlApp.crawlFile('https://www.example.com/file').then((res) => {})
7575
```
7676

77+
::: tip
7778
The res obtained will be an object.
79+
:::
7880

7981
### Detailed target configuration - CrawlFileDetailTargetConfig
8082

@@ -96,9 +98,11 @@ crawlApp
9698
.then((res) => {})
9799
```
98100

99-
The res obtained will be an object.
101+
For more configuration options, see [CrawlFileDetailTargetConfig](/type/crawl-file#crawlfiledetailtargetconfig).
100102

101-
For more configuration options, see [CrawlFileDetailTargetConfig](#CrawlFileDetailTargetConfig).
103+
::: tip
104+
The res obtained will be an object.
105+
:::
102106

103107
### Mixed target array configuration - (string | CrawlFileDetailTargetConfig)[]
104108

@@ -118,9 +122,11 @@ crawlApp
118122
.then((res) => {})
119123
```
120124

121-
The res obtained will be an array containing objects.
125+
For more configuration options, see [CrawlFileDetailTargetConfig](/type/crawl-file#crawlfiledetailtargetconfig).
122126

123-
For more configuration options, see [CrawlFileDetailTargetConfig](#CrawlFileDetailTargetConfig).
127+
::: tip
128+
The res obtained will be an array containing objects.
129+
:::
124130

125131
### Advanced configuration - CrawlFileAdvancedConfig
126132

@@ -144,8 +150,10 @@ crawlApp
144150
.then((res) => {})
145151
```
146152

147-
The res obtained will be an array containing objects.
153+
For more configuration options, see [CrawlFileAdvancedConfig](/type/crawl-file/cn/type/crawl-file#crawlfileadvancedconfig).
148154

149-
For more configuration options, see [CrawlFileAdvancedConfig](#CrawlFileAdvancedConfig).
155+
::: tip
156+
The res obtained will be an array containing objects.
157+
:::
150158

151-
For more information about the results, please view [About the results](#About the results). You can choose it according to the actual situation.
159+
For more information about the results, please view [About the results](/guide/results#about-the-results). You can choose it according to the actual situation.

docs/api/crawl-html.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ type crawlHTML = {
2222
2323
**Parameter Type:**
2424
25-
- View the [CrawlHTMLDetailTargetConfig](#CrawlHTMLDetailTargetConfig) type
26-
- View the [CrawlHTMLAdvancedConfig](#CrawlHTMLAdvancedConfig) type
25+
- View the [CrawlHTMLDetailTargetConfig](/type/crawl-html#crawlhtmldetailtargetconfig) type
26+
- View the [CrawlHTMLAdvancedConfig](/type/crawl-html#crawlhtmladvancedconfig) type
2727
2828
**Return value type:**
2929
30-
- View the [CrawlHTMLSingleResult](#CrawlHTMLSingleResult) type
30+
- View the [CrawlHTMLSingleResult](/type/crawl-html#crawlhtmlsingleresult) type
3131
3232
## Example
3333
@@ -61,7 +61,9 @@ const crawlApp = createCrawl()
6161
crawlApp.crawlHTML('https://www.example.com').then((res) => {})
6262
```
6363

64+
::: tip
6465
The res obtained will be an object.
66+
:::
6567

6668
### Detailed target configuration - CrawlHTMLDetailTargetConfig
6769

@@ -81,9 +83,11 @@ crawlApp
8183
.then((res) => {})
8284
```
8385

84-
The res obtained will be an object.
86+
For more configuration options, see [CrawlHTMLDetailTargetConfig](/type/crawl-html#crawlhtmldetailtargetconfig).
8587

86-
For more configuration options, see [CrawlHTMLDetailTargetConfig](#CrawlHTMLDetailTargetConfig).
88+
::: tip
89+
The res obtained will be an object.
90+
:::
8791

8892
### Mixed target array configuration - (string | CrawlHTMLDetailTargetConfig)[]
8993

@@ -102,9 +106,11 @@ crawlApp
102106
.then((res) => {})
103107
```
104108

105-
The res obtained will be an array containing objects.
109+
For more configuration options, see [CrawlHTMLDetailTargetConfig](/type/crawl-html#crawlhtmldetailtargetconfig).
106110

107-
For more configuration options, see [CrawlHTMLDetailTargetConfig](#CrawlHTMLDetailTargetConfig).
111+
::: tip
112+
The res obtained will be an array containing objects.
113+
:::
108114

109115
### Advanced configuration - CrawlHTMLAdvancedConfig
110116

@@ -128,8 +134,10 @@ crawlApp
128134
.then((res) => {})
129135
```
130136

131-
The res obtained will be an array containing objects.
137+
For more configuration options, see [CrawlHTMLAdvancedConfig](/type/crawl-html#crawlhtmladvancedconfig).
132138

133-
For more configuration options, see [CrawlHTMLAdvancedConfig](#CrawlHTMLAdvancedConfig).
139+
::: tip
140+
The res obtained will be an array containing objects.
141+
:::
134142

135-
For more information about the results, please view [About the results](#About the results). You can choose it according to the actual situation.
143+
For more information about the results, please view [About the results](/guide/results#about-the-results). You can choose it according to the actual situation.

docs/api/crawl-page.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ type crawlPage = {
2222
2323
**Parameter Type:**
2424
25-
- View the [CrawlPageDetailTargetConfig](#CrawlPageDetailTargetConfig) type
26-
- View the [CrawlPageAdvancedConfig](#CrawlPageAdvancedConfig) type
25+
- View the [CrawlPageDetailTargetConfig](/type/crawl-page#crawlpagedetailtargetconfig) type
26+
- View the [CrawlPageAdvancedConfig](/type/crawl-page#crawlpageadvancedconfig) type
2727
2828
**Return value type:**
2929
30-
- View the [CrawlPageSingleResult](#CrawlPageSingleResult) type
30+
- View the [CrawlPageSingleResult](/type/crawl-page#crawlpagesingleresult) type
3131
3232
## Example
3333
@@ -66,7 +66,9 @@ const crawlApp = createCrawl()
6666
crawlApp.crawlPage('https://www.example.com').then((res) => {})
6767
```
6868

69+
::: tip
6970
The res obtained will be an object.
71+
:::
7072

7173
### Detailed target configuration - CrawlPageDetailTargetConfig
7274

@@ -86,9 +88,11 @@ crawlApp
8688
.then((res) => {})
8789
```
8890

89-
The res obtained will be an object.
91+
For more configuration options, see [CrawlPageDetailTargetConfig](/type/crawl-page#crawlpagedetailtargetconfig).
9092

91-
For more configuration options, see [CrawlPageDetailTargetConfig](#CrawlPageDetailTargetConfig).
93+
::: tip
94+
The res obtained will be an object.
95+
:::
9296

9397
### Mixed target array configuration - (string | CrawlPageDetailTargetConfig)[]
9498

@@ -107,9 +111,11 @@ crawlApp
107111
.then((res) => {})
108112
```
109113

110-
The res obtained will be an array containing objects.
114+
For more configuration options, see [CrawlPageDetailTargetConfig](/type/crawl-page#crawlpagedetailtargetconfig).
111115

112-
For more configuration options, see [CrawlPageDetailTargetConfig](#CrawlPageDetailTargetConfig).
116+
::: tip
117+
The res obtained will be an array containing objects.
118+
:::
113119

114120
### Advanced configuration - CrawlPageAdvancedConfig
115121

@@ -133,8 +139,10 @@ crawlApp
133139
.then((res) => {})
134140
```
135141

136-
The res obtained will be an array containing objects.
142+
For more configuration options, see [CrawlPageAdvancedConfig](/type/crawl-page#crawlpageadvancedconfig).
137143

138-
For more configuration options, see [CrawlPageAdvancedConfig](#CrawlPageAdvancedConfig).
144+
::: tip
145+
The res obtained will be an array containing objects.
146+
:::
139147

140-
For more information about the results, please view [About the results](#About the results). You can choose it according to the actual situation.
148+
For more information about the results, please view [About the results](/guide/results#about-the-results). You can choose it according to the actual situation.

docs/api/create-crawl-openai.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ function createXCrawlOpenAI(config?: CreateXCrawlOpenAIConfig): XCrawlOpenAIApp
1212

1313
**Parameter Type:**
1414

15-
- View the [CreateXCrawlOpenAIConfig](#CreateXCrawlOpenAIConfig) type
15+
- View the [CreateXCrawlOpenAIConfig](/type/create-crawl-openai#createcrawlopenaiconfig) type
1616

1717
**Return value type:**
1818

19-
- View the [XCrawlOpenAIApp](#XCrawlOpenAIApp) type
19+
- View the [XCrawlOpenAIApp](/type/create-crawl-openai#crawlopenaiapp) type
2020

2121
## Example
2222

docs/api/get-element-selectors.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ function getElementSelectors(
1616

1717
**Parameter Type:**
1818

19-
- View the [XCrawlOpenAIGetElementSelectorsContentOptions](#XCrawlOpenAIGetElementSelectorsContentOptions) type
20-
- View the [XCrawlOpenAICommonAPIOtherOption](#XCrawlOpenAICommonAPIOtherOption) type
19+
- View the [XCrawlOpenAIGetElementSelectorsContentOptions](/type/get-element-selectors#crawlopenaigetelementselectorscontentoptions) type
20+
- View the [XCrawlOpenAICommonAPIOtherOption](/type/crawl-openai-other-config#crawlopenaicommonapiotheroption) type
2121

2222
**Return value type:**
2323

24-
- View the [XCrawlOpenAIGetElementSelectorsResult](#XCrawlOpenAIGetElementSelectorsResult) type
24+
- View the [XCrawlOpenAIGetElementSelectorsResult](/type/get-element-selectors#crawlopenaigetelementselectorsresult) type
2525

2626
## Example
2727

docs/api/help.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function help(
1515

1616
**Parameter Type:**
1717

18-
- View the [XCrawlOpenAICommonAPIOtherOption](#XCrawlOpenAICommonAPIOtherOption) type
18+
- View the [XCrawlOpenAICommonAPIOtherOption](/type/crawl-openai-other-config#crawlopenaicommonapiotheroption) type
1919

2020
## Example
2121

docs/api/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#createCrawl
1+
# createCrawl
22

33
Create a crawler application instance by calling createCrawl. The crawl target is maintained internally by the instance method, not by the instance.
44

@@ -12,11 +12,11 @@ function createCrawl(config?: CreateCrawlConfig): CrawlApp
1212

1313
**Parameter Type:**
1414

15-
- View the [CreateCrawlConfig](#CreateCrawlConfig) type
15+
- View the [CreateCrawlConfig](/type/index#createcrawlconfig) type
1616

1717
**Return value type:**
1818

19-
- View the [CrawlApp](#CrawlApp) type
19+
- View the [CrawlApp](/type/index#crawlapp) type
2020

2121
## Example
2222

docs/api/parse-elements.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ function parseElements<T extends Record<string, string>>(
1616

1717
**Parameter Type:**
1818

19-
- View the [XCrawlOpenAIParseElementsContentOptions](#XCrawlOpenAIParseElementsContentOptions) type
20-
- View the [XCrawlOpenAICommonAPIOtherOption](#XCrawlOpenAICommonAPIOtherOption) type
19+
- View the [XCrawlOpenAIParseElementsContentOptions](/type/parse-elements#crawlopenaiparseelementscontentoptions) type
20+
- View the [XCrawlOpenAICommonAPIOtherOption](/type/crawl-openai-other-config#crawlopenaicommonapiotheroption) type
2121

2222
**Return value type:**
2323

24-
- View the [XCrawlOpenAIParseElementsResult](#XCrawlOpenAIParseElementsResult) type
24+
- View the [XCrawlOpenAIParseElementsResult](/type/parse-elements#crawlopenaiparseelementsresult) type
2525

2626
## Example
2727

0 commit comments

Comments
 (0)