Closure-RI commited on
Commit
f117693
·
verified ·
1 Parent(s): cf8e6af

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +1 -3
index.js CHANGED
@@ -1287,6 +1287,7 @@ async function scrapeHAnimeDetails(url) {
1287
 
1288
  if (dataId) {
1289
  await newPage.goto(dataId, { waitUntil: "domcontentloaded" });
 
1290
  await delay(17000); // Delay 8 detik untuk memastikan data tersedia
1291
 
1292
  const response = await axios.get(`https://arashicode-api.hf.space/html?url=${dataId}`);
@@ -1302,15 +1303,12 @@ async function scrapeHAnimeDetails(url) {
1302
  }
1303
  });
1304
  }
1305
-
1306
- await newPage.close();
1307
  }
1308
 
1309
  // Tambahkan video ke hasil metadata
1310
  result.video = video;
1311
 
1312
  // Tutup browser
1313
- await browser.close();
1314
 
1315
  return result;
1316
  } catch (error) {
 
1287
 
1288
  if (dataId) {
1289
  await newPage.goto(dataId, { waitUntil: "domcontentloaded" });
1290
+ await browser.close();
1291
  await delay(17000); // Delay 8 detik untuk memastikan data tersedia
1292
 
1293
  const response = await axios.get(`https://arashicode-api.hf.space/html?url=${dataId}`);
 
1303
  }
1304
  });
1305
  }
 
 
1306
  }
1307
 
1308
  // Tambahkan video ke hasil metadata
1309
  result.video = video;
1310
 
1311
  // Tutup browser
 
1312
 
1313
  return result;
1314
  } catch (error) {