File tree 6 files changed +11
-7
lines changed
6 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ module.exports = {
15
15
'@typescript-eslint/no-explicit-any' : 'off' ,
16
16
'@typescript-eslint/no-empty-interface' : 'off' ,
17
17
'@typescript-eslint/no-var-requires' : 'off' ,
18
- '@typescript-eslint/no-non-null-assertion' : 'off'
18
+ '@typescript-eslint/no-non-null-assertion' : 'off' ,
19
+ 'no-empty' : 'off'
19
20
}
20
21
}
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ running result:
136
136
137
137
#### An example of a crawler application
138
138
139
- Create a new **application instance** via [xCrawl()](#xCrawl ):
139
+ Create a new **application instance** via [xCrawl()](#x-crawl-2 ):
140
140
141
141
` ` ` js
142
142
import xCrawl from ' x-crawl'
Original file line number Diff line number Diff line change 1
1
{
2
2
"private" : true ,
3
3
"name" : " x-crawl" ,
4
- "version" : " 3.2.10 " ,
4
+ "version" : " 3.2.11 " ,
5
5
"author" : " coderHXL" ,
6
6
"description" : " x-crawl is a flexible nodejs crawler library." ,
7
7
"license" : " MIT" ,
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ running result:
136
136
137
137
#### An example of a crawler application
138
138
139
- Create a new **application instance** via [xCrawl()](#xCrawl ):
139
+ Create a new **application instance** via [xCrawl()](#x-crawl-2 ):
140
140
141
141
` ` ` js
142
142
import xCrawl from ' x-crawl'
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " x-crawl" ,
3
- "version" : " 3.2.10 " ,
3
+ "version" : " 3.2.11 " ,
4
4
"author" : " coderHXL" ,
5
5
"description" : " x-crawl is a flexible nodejs crawler library." ,
6
6
"license" : " MIT" ,
Original file line number Diff line number Diff line change @@ -149,10 +149,13 @@ export function createCrawlPage(baseConfig: LoaderXCrawlBaseConfig) {
149
149
timeout : requestConfig . timeout
150
150
} )
151
151
} catch ( error : any ) {
152
- console . log ( `error : ${ logError ( error . message ) } ` )
152
+ console . log ( logError ( `Error : ${ error . message } ` ) )
153
153
}
154
154
155
- const content = await page ! . content ( )
155
+ let content = ''
156
+ try {
157
+ content = await page ! . content ( )
158
+ } catch { }
156
159
157
160
const res : CrawlPage = {
158
161
httpResponse,
You can’t perform that action at this time.
0 commit comments