File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -39,15 +39,20 @@ async function lookup(store: Store) {
39
39
width : Config . page . width
40
40
} ) ;
41
41
42
- await page . goto ( link . url , { waitUntil : 'networkidle0' } ) ;
42
+ const graphicsCard = `${ link . brand } ${ link . model } ` ;
43
+
44
+ try {
45
+ await page . goto ( link . url , { waitUntil : 'networkidle0' } ) ;
46
+ } catch {
47
+ Logger . error ( `✖ [${ store . name } ] ${ graphicsCard } skipping; timed out` ) ;
48
+ return ;
49
+ }
43
50
44
51
const bodyHandle = await page . $ ( 'body' ) ;
45
52
const textContent = await page . evaluate ( body => body . textContent , bodyHandle ) ;
46
53
47
54
Logger . debug ( textContent ) ;
48
55
49
- const graphicsCard = `${ link . brand } ${ link . model } ` ;
50
-
51
56
if ( isOutOfStock ( textContent , link . oosLabels ) ) {
52
57
Logger . info ( `✖ [${ store . name } ] ${ graphicsCard } is still out of stock` ) ;
53
58
} else {
You can’t perform that action at this time.
0 commit comments