File tree 4 files changed +7
-32
lines changed
4 files changed +7
-32
lines changed Original file line number Diff line number Diff line change @@ -46,11 +46,8 @@ class DuckduckgoScraper extends Scraper {
46
46
47
47
async load_start_page ( ) {
48
48
debug ( 'load_start_page' ) ;
49
- let startUrl = 'https://duckduckgo.com/' ;
50
-
51
- this . last_response = await this . page . goto ( startUrl ) ;
49
+ this . last_response = await this . page . goto ( this . startUrl ) ;
52
50
await this . page . waitForSelector ( 'input[name="q"]' , { timeout : this . STANDARD_TIMEOUT } ) ;
53
-
54
51
return true ;
55
52
}
56
53
Original file line number Diff line number Diff line change @@ -213,26 +213,8 @@ class GoogleScraper extends Scraper {
213
213
}
214
214
215
215
async load_start_page ( ) {
216
- let startUrl = 'https://www.google.com' ;
217
-
218
- if ( this . config . google_settings ) {
219
- startUrl = `https://www.${ this . config . google_settings . google_domain } /search?q=` ;
220
- if ( this . config . google_settings . google_domain ) {
221
- startUrl = `https://www.${ this . config . google_settings . google_domain } /search?` ;
222
- } else {
223
- startUrl = `https://www.google.com/search?` ;
224
- }
225
-
226
- for ( var key in this . config . google_settings ) {
227
- if ( key !== 'google_domain' ) {
228
- startUrl += `${ key } =${ this . config . google_settings [ key ] } &`
229
- }
230
- }
231
- }
232
-
233
- this . logger . info ( 'Using startUrl: ' + startUrl ) ;
234
-
235
- this . last_response = await this . page . goto ( startUrl ) ;
216
+ this . logger . info ( 'Using startUrl: ' + this . startUrl ) ;
217
+ this . last_response = await this . page . goto ( this . startUrl ) ;
236
218
237
219
await this . page . waitForSelector ( 'input[name="q"]' , { timeout : this . STANDARD_TIMEOUT } ) ;
238
220
Original file line number Diff line number Diff line change @@ -41,11 +41,8 @@ class InfospaceScraper extends Scraper {
41
41
}
42
42
43
43
async load_start_page ( ) {
44
-
45
- let startUrl = this . build_start_url ( 'http://search.infospace.com/search/web?' ) || 'http://infospace.com/index.html' ;
46
-
47
44
try {
48
- this . last_response = await this . page . goto ( startUrl ) ;
45
+ this . last_response = await this . page . goto ( this . this . startUrl ) ;
49
46
await this . page . waitForSelector ( 'input[name="q"]' , { timeout : 5000 } ) ;
50
47
} catch ( e ) {
51
48
return false ;
Original file line number Diff line number Diff line change @@ -71,11 +71,10 @@ class YandexScraper extends Scraper {
71
71
}
72
72
73
73
async load_start_page ( ) {
74
- let startUrl = 'https://yandex.com' ;
74
+
75
+ this . logger . info ( 'Using startUrl: ' + this . startUrl ) ;
75
76
76
- this . logger . info ( 'Using startUrl: ' + startUrl ) ;
77
-
78
- this . last_response = await this . page . goto ( startUrl ) ;
77
+ this . last_response = await this . page . goto ( this . startUrl ) ;
79
78
80
79
await this . page . waitForSelector ( 'input[name="text"]' , { timeout : this . STANDARD_TIMEOUT } ) ;
81
80
You can’t perform that action at this time.
0 commit comments