Spaces:
Running
Running
connorlixyz
commited on
Commit
•
895f8fd
1
Parent(s):
cb2ad31
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: 3000});
|
30 |
const timestamp = new Date().toISOString();
|
31 |
const logMessage = `${timestamp}: Web visited Successfully ${url}\n`;
|
32 |
|