@@ -21,7 +21,7 @@ jest.setTimeout(60000)
21
21
async function writtenString ( ) {
22
22
const testXCrawl = xCrawl ( )
23
23
24
- const res = await testXCrawl . crawlPage ( 'https ://gitee.com/coderhxl ' )
24
+ const res = await testXCrawl . crawlPage ( 'http ://localhost:8888/html ' )
25
25
26
26
await res . data . browser . close ( )
27
27
@@ -33,7 +33,7 @@ async function writtenCrawlPageDetailConfig() {
33
33
const testXCrawl = xCrawl ( { proxy : { urls : [ 'http://localhost:14892' ] } } )
34
34
35
35
const res = await testXCrawl . crawlPage ( {
36
- url : 'https ://github.com/coder-hxl/x-crawl '
36
+ url : 'http ://localhost:8888/html '
37
37
} )
38
38
39
39
await res . data . browser . close ( )
@@ -46,8 +46,8 @@ async function writtenStringAndCrawlPageDetailConfigArr() {
46
46
const testXCrawl = xCrawl ( { proxy : { urls : [ 'http://localhost:14892' ] } } )
47
47
48
48
const res = await testXCrawl . crawlPage ( [
49
- 'https ://github.com/coder-hxl/x-crawl ' ,
50
- { url : 'https ://github.com/coder-hxl/x-crawl ' }
49
+ 'http ://localhost:8888/html ' ,
50
+ { url : 'http ://localhost:8888/html ' }
51
51
] )
52
52
53
53
await res [ 0 ] . data . browser . close ( )
@@ -61,8 +61,8 @@ async function writtenCrawlPageAdvancedConfig() {
61
61
62
62
const res = await testXCrawl . crawlPage ( {
63
63
targets : [
64
- 'https ://github.com/coder-hxl/x-crawl ' ,
65
- { url : 'https ://github.com/coder-hxl/x-crawl ' }
64
+ 'http ://localhost:8888/html ' ,
65
+ { url : 'http ://localhost:8888/html ' }
66
66
]
67
67
} )
68
68
@@ -75,14 +75,14 @@ async function writtenCrawlPageAdvancedConfig() {
75
75
// 2.1.Loader Base Config
76
76
async function loaderBaseConfig ( ) {
77
77
const testXCrawl = xCrawl ( {
78
- baseUrl : 'https ://github.com ' ,
78
+ baseUrl : 'http ://localhost:8888 ' ,
79
79
proxy : { urls : [ 'http://localhost:14892' ] } ,
80
80
timeout : 10000 ,
81
81
intervalTime : { max : 1000 } ,
82
82
maxRetry : 0
83
83
} )
84
84
85
- const res = await testXCrawl . crawlPage ( [ '/coder-hxl ' , '/coder-hxl/x-crawl ' ] )
85
+ const res = await testXCrawl . crawlPage ( [ '/html ' , '/html ' ] )
86
86
87
87
await res [ 0 ] . data . browser . close ( )
88
88
@@ -91,10 +91,10 @@ async function loaderBaseConfig() {
91
91
92
92
// 2.2.Loader Advanced Config
93
93
async function loaderAdvancedConfig ( ) {
94
- const testXCrawl = xCrawl ( { baseUrl : 'https ://github.com ' } )
94
+ const testXCrawl = xCrawl ( { baseUrl : 'http ://localhost:8888 ' } )
95
95
96
96
const res = await testXCrawl . crawlPage ( {
97
- targets : [ '/coder-hxl ' , '/coder-hxl/x-crawl ' ] ,
97
+ targets : [ '/html ' , '/html ' ] ,
98
98
proxy : { urls : [ 'http://localhost:14892' ] } ,
99
99
timeout : 10000 ,
100
100
intervalTime : { max : 1000 } ,
0 commit comments