Spaces:
Running
Running
Commit
•
0e04a93
1
Parent(s):
d12da9d
Update index.js
Browse files
index.js
CHANGED
@@ -26,7 +26,7 @@ const urls = [
|
|
26 |
// 访问网页并将结果写入日志
|
27 |
async function scrapeAndLog(url) {
|
28 |
try {
|
29 |
-
const response = await axios.get(url, {timeout:
|
30 |
const timestamp = new Date().toISOString();
|
31 |
const logMessage = `${timestamp}: Web visited Successfully ${url}\n`;
|
32 |
|
|
|
26 |
// 访问网页并将结果写入日志
|
27 |
async function scrapeAndLog(url) {
|
28 |
try {
|
29 |
+
const response = await axios.get(url, {timeout: 5000});
|
30 |
const timestamp = new Date().toISOString();
|
31 |
const logMessage = `${timestamp}: Web visited Successfully ${url}\n`;
|
32 |
|