Skip to content

Commit 28d2e0b

Browse files
committed
Update document
1 parent 408e85a commit 28d2e0b

File tree

5 files changed

+124
-22
lines changed

5 files changed

+124
-22
lines changed

README.md

+41-7
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,43 @@ XCrawl is a Nodejs multifunctional crawler library.
1313
- Anthropomorphic request interval
1414
- Written in TypeScript
1515

16-
## Catalog
17-
18-
[TOC]
16+
# Table of Contents
17+
18+
- [Install](#Install)
19+
- [Example](#Example)
20+
- [Core concepts](#Core concepts)
21+
* [XCrawl](#XCrawl)
22+
+ [Type](#Type-1)
23+
+ [Example](#Example-1)
24+
+ [Mode](#Mode)
25+
+ [IntervalTime](#IntervalTime)
26+
* [fetchHTML](#fetchHTML)
27+
+ [Type](#Type-2)
28+
+ [Example](#Example-2)
29+
* [fetchData](#fetchData)
30+
+ [Type](#Type-3)
31+
+ [Example](#Example-3)
32+
* [fetchFile](#fetchFile)
33+
+ [Type](#Type-4)
34+
+ [Example](#Example-4)
35+
* [fetchPolling](#fetchPolling)
36+
+ [Type](#Type-5)
37+
+ [Example](#Example-5)
38+
- [Types](#Types)
39+
* [IAnyObject](#IAnyObject)
40+
* [IMethod](#IMethod)
41+
* [IRequestConfig](#IRequestConfig)
42+
* [IIntervalTime](#IIntervalTime)
43+
* [IFetchBaseConifg](#IFetchBaseConifg)
44+
* [IXCrawlBaseConifg](#IXCrawlBaseConifg)
45+
* [IFetchHTMLConfig](#IFetchHTMLConfig )
46+
* [IFetchDataConfig](#IFetchDataConfig)
47+
* [IFetchFileConfig](#IFetchFileConfig)
48+
* [IFetchPollingConfig](#IFetchPollingConfig)
49+
* [IFetchCommon](#IFetchCommon)
50+
* [IFileInfo](#IFileInfo)
51+
* [IFetchHTML](#IFetchHTML)
52+
- [More](#More)
1953

2054
## Install
2155

@@ -25,7 +59,7 @@ Take NPM as an example:
2559
npm install x-crawl
2660
```
2761

28-
## example
62+
## Example
2963

3064
Get the title of https://docs.github.com/zh/get-started as an example:
3165

@@ -122,7 +156,7 @@ myXCrawl.fetchHTML('/xxx').then((res) => {
122156
123157
### fetchData
124158
125-
fetchData is the method of the above [myXCrawl](https://github.com/coder-hxl/x-crawl#Example-1) instance, which is usually used to crawl APIs to obtain JSON data and so on.
159+
fetchData is the method of the above [myXCrawl](#Example-1) instance, which is usually used to crawl APIs to obtain JSON data and so on.
126160
127161
#### Type
128162
@@ -149,7 +183,7 @@ myXCrawl.fetchData({
149183
150184
### fetchFile
151185
152-
fetchFile is the method of the above [myXCrawl](https://github.com/coder-hxl/x-crawl#Example-1) instance, which is usually used to crawl files, such as pictures, pdf files, etc.
186+
fetchFile is the method of the above [myXCrawl](#Example-1) instance, which is usually used to crawl files, such as pictures, pdf files, etc.
153187
154188
#### Type
155189
@@ -178,7 +212,7 @@ myXCrawl.fetchFile({
178212
179213
### fetchPolling
180214
181-
fetchPolling is a method of the [myXCrawl](https://github.com/coder-hxl/x-crawl#Example-1) instance, typically used to perform polling operations, such as getting news every once in a while.
215+
fetchPolling is a method of the [myXCrawl](#Example-1) instance, typically used to perform polling operations, such as getting news every once in a while.
182216
183217
#### Type
184218

document/cn.md

+40-6
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,43 @@ XCrawl 是 Nodejs 多功能爬虫库。
1313
- 拟人化的请求间隔时间
1414
- 使用 TypeScript 编写
1515

16-
## 目录
17-
18-
[TOC]
16+
# 目录
17+
18+
- [安装](#安装)
19+
- [示例](#示例)
20+
- [核心概念](#核心概念)
21+
* [XCrawl](#XCrawl)
22+
+ [类型](#Type-1)
23+
+ [示例](#示例-1)
24+
+ [模式](#模式)
25+
+ [间隔时间](#间隔时间)
26+
* [fetchHTML](#fetchHTML)
27+
+ [类型](#类型-2)
28+
+ [示例](#示例-2)
29+
* [fetchData](#fetchData)
30+
+ [类型](#类型-3)
31+
+ [示例](#示例-3)
32+
* [fetchFile](#fetchFile)
33+
+ [类型](#类型-4)
34+
+ [示例](#示例-4)
35+
* [fetchPolling](#fetchPolling)
36+
+ [类型](#类型-5)
37+
+ [示例](#示例-5)
38+
- [类型](#类型-6)
39+
* [IAnyObject](#IAnyObject)
40+
* [IMethod](#IMethod)
41+
* [IRequestConfig](#IRequestConfig)
42+
* [IIntervalTime](#IIntervalTime)
43+
* [IFetchBaseConifg](#IFetchBaseConifg)
44+
* [IXCrawlBaseConifg](#IXCrawlBaseConifg)
45+
* [IFetchHTMLConfig](#IFetchHTMLConfig )
46+
* [IFetchDataConfig](#IFetchDataConfig)
47+
* [IFetchFileConfig](#IFetchFileConfig)
48+
* [IFetchPollingConfig](#IFetchPollingConfig)
49+
* [IFetchCommon](#IFetchCommon)
50+
* [IFileInfo](#IFileInfo)
51+
* [IFetchHTML](#IFetchHTML)
52+
- [更多](#更多)
1953

2054
## 安装
2155

@@ -134,7 +168,7 @@ myXCrawl.fetchHTML('/xxx').then((res) => {
134168
135169
### fetchData
136170
137-
fetch 是 [myXCrawl](https://github.com/coder-hxl/x-crawl/blob/main/document/cn.md#%E7%A4%BA%E4%BE%8B-1) 实例的方法,通常用于爬取 API ,可获取 JSON 数据等等。
171+
fetch 是 [myXCrawl](#示例-1) 实例的方法,通常用于爬取 API ,可获取 JSON 数据等等。
138172
139173
#### 类型
140174
@@ -161,7 +195,7 @@ myXCrawl.fetchData({
161195
162196
### fetchFile
163197
164-
fetchFile 是 [myXCrawl](https://github.com/coder-hxl/x-crawl/blob/main/document/cn.md#%E7%A4%BA%E4%BE%8B-1) 实例的方法,通常用于爬取文件,可获取图片、pdf 文件等等。
198+
fetchFile 是 [myXCrawl](#示例-1) 实例的方法,通常用于爬取文件,可获取图片、pdf 文件等等。
165199
166200
#### 类型
167201
@@ -190,7 +224,7 @@ myXCrawl.fetchFile({
190224
191225
### fetchPolling
192226
193-
fetchPolling 是 [myXCrawl](https://github.com/coder-hxl/x-crawl/blob/main/document/cn.md#%E7%A4%BA%E4%BE%8B-1) 实例的方法,通常用于进行轮询操作,比如每隔一段时间获取新闻之类的。
227+
fetchPolling 是 [myXCrawl](#示例-1) 实例的方法,通常用于进行轮询操作,比如每隔一段时间获取新闻之类的。
194228
195229
#### 类型
196230

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
33
"name": "x-crawl",
4-
"version": "0.3.0",
4+
"version": "0.3.1",
55
"author": "CoderHxl",
66
"description": "XCrawl is a Nodejs multifunctional crawler library.",
77
"license": "MIT",

publish/README.md

+41-7
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,43 @@ XCrawl is a Nodejs multifunctional crawler library.
1313
- Anthropomorphic request interval
1414
- Written in TypeScript
1515

16-
## Catalog
17-
18-
[TOC]
16+
# Table of Contents
17+
18+
- [Install](#Install)
19+
- [Example](#Example)
20+
- [Core concepts](#Core concepts)
21+
* [XCrawl](#XCrawl)
22+
+ [Type](#Type-1)
23+
+ [Example](#Example-1)
24+
+ [Mode](#Mode)
25+
+ [IntervalTime](#IntervalTime)
26+
* [fetchHTML](#fetchHTML)
27+
+ [Type](#Type-2)
28+
+ [Example](#Example-2)
29+
* [fetchData](#fetchData)
30+
+ [Type](#Type-3)
31+
+ [Example](#Example-3)
32+
* [fetchFile](#fetchFile)
33+
+ [Type](#Type-4)
34+
+ [Example](#Example-4)
35+
* [fetchPolling](#fetchPolling)
36+
+ [Type](#Type-5)
37+
+ [Example](#Example-5)
38+
- [Types](#Types)
39+
* [IAnyObject](#IAnyObject)
40+
* [IMethod](#IMethod)
41+
* [IRequestConfig](#IRequestConfig)
42+
* [IIntervalTime](#IIntervalTime)
43+
* [IFetchBaseConifg](#IFetchBaseConifg)
44+
* [IXCrawlBaseConifg](#IXCrawlBaseConifg)
45+
* [IFetchHTMLConfig](#IFetchHTMLConfig )
46+
* [IFetchDataConfig](#IFetchDataConfig)
47+
* [IFetchFileConfig](#IFetchFileConfig)
48+
* [IFetchPollingConfig](#IFetchPollingConfig)
49+
* [IFetchCommon](#IFetchCommon)
50+
* [IFileInfo](#IFileInfo)
51+
* [IFetchHTML](#IFetchHTML)
52+
- [More](#More)
1953

2054
## Install
2155

@@ -25,7 +59,7 @@ Take NPM as an example:
2559
npm install x-crawl
2660
```
2761

28-
## example
62+
## Example
2963

3064
Get the title of https://docs.github.com/zh/get-started as an example:
3165

@@ -122,7 +156,7 @@ myXCrawl.fetchHTML('/xxx').then((res) => {
122156
123157
### fetchData
124158
125-
fetchData is the method of the above [myXCrawl](https://github.com/coder-hxl/x-crawl#Example-1) instance, which is usually used to crawl APIs to obtain JSON data and so on.
159+
fetchData is the method of the above [myXCrawl](#Example-1) instance, which is usually used to crawl APIs to obtain JSON data and so on.
126160
127161
#### Type
128162
@@ -149,7 +183,7 @@ myXCrawl.fetchData({
149183
150184
### fetchFile
151185
152-
fetchFile is the method of the above [myXCrawl](https://github.com/coder-hxl/x-crawl#Example-1) instance, which is usually used to crawl files, such as pictures, pdf files, etc.
186+
fetchFile is the method of the above [myXCrawl](#Example-1) instance, which is usually used to crawl files, such as pictures, pdf files, etc.
153187
154188
#### Type
155189
@@ -178,7 +212,7 @@ myXCrawl.fetchFile({
178212
179213
### fetchPolling
180214
181-
fetchPolling is a method of the [myXCrawl](https://github.com/coder-hxl/x-crawl#Example-1) instance, typically used to perform polling operations, such as getting news every once in a while.
215+
fetchPolling is a method of the [myXCrawl](#Example-1) instance, typically used to perform polling operations, such as getting news every once in a while.
182216
183217
#### Type
184218

publish/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "x-crawl",
3-
"version": "0.3.0",
3+
"version": "0.3.1",
44
"author": "CoderHxl",
55
"description": "XCrawl is a Nodejs multifunctional crawler library.",
66
"license": "MIT",

0 commit comments

Comments
 (0)