@blocklet/crawler 2.1.251 → 2.1.252
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -161,7 +161,7 @@ const getBrowser = async () => {
|
|
|
161
161
|
// 限制V8内存
|
|
162
162
|
"--disable-background-networking", "--disable-default-apps",
|
|
163
163
|
// '--disable-web-security', // 允许跨域请求
|
|
164
|
-
"--disable-software-rasterizer", "--disable-crash-reporter", "--disable-service-workers", "--
|
|
164
|
+
"--disable-software-rasterizer", "--disable-crash-reporter", "--disable-service-workers", "--disable-notifications", "--disable-infobars", "--font-render-hinting=none"]
|
|
165
165
|
});
|
|
166
166
|
logger.info("Launch browser success");
|
|
167
167
|
const browserWSEndpoint = await browser.wsEndpoint();
|
|
@@ -357,7 +357,6 @@ async function getDefaultGateway() {
|
|
|
357
357
|
if (stdout.trim()) {
|
|
358
358
|
const hex = stdout.trim();
|
|
359
359
|
const ip = [parseInt(hex.slice(6, 8), 16), parseInt(hex.slice(4, 6), 16), parseInt(hex.slice(2, 4), 16), parseInt(hex.slice(0, 2), 16)].join(".");
|
|
360
|
-
logger.info(`Detected default gateway address: ${ip}`);
|
|
361
360
|
return ip;
|
|
362
361
|
}
|
|
363
362
|
} catch (err) {}
|
|
@@ -114,11 +114,9 @@ export const getBrowser = async () => {
|
|
|
114
114
|
"--disable-software-rasterizer",
|
|
115
115
|
"--disable-crash-reporter",
|
|
116
116
|
"--disable-service-workers",
|
|
117
|
-
"--no-startup-window",
|
|
118
|
-
"--single-process",
|
|
119
|
-
"--disable-gpu",
|
|
120
117
|
"--disable-notifications",
|
|
121
|
-
"--disable-infobars"
|
|
118
|
+
"--disable-infobars",
|
|
119
|
+
"--font-render-hinting=none"
|
|
122
120
|
]
|
|
123
121
|
});
|
|
124
122
|
logger.info("Launch browser success");
|
|
@@ -384,7 +382,6 @@ async function getDefaultGateway() {
|
|
|
384
382
|
parseInt(hex.slice(2, 4), 16),
|
|
385
383
|
parseInt(hex.slice(0, 2), 16)
|
|
386
384
|
].join(".");
|
|
387
|
-
logger.info(`Detected default gateway address: ${ip}`);
|
|
388
385
|
return ip;
|
|
389
386
|
}
|
|
390
387
|
} catch (err) {
|