Spaces:
Paused
Paused
Update index.js
Browse files
index.js
CHANGED
|
@@ -1240,6 +1240,8 @@ async function scrapeHAnimeDetails(url) {
|
|
| 1240 |
});
|
| 1241 |
|
| 1242 |
console.log("Result Metadata:", result);
|
|
|
|
|
|
|
| 1243 |
|
| 1244 |
const playButtonSelector = "body > div > div.play.p-pulse";
|
| 1245 |
if (await page.$(playButtonSelector)) {
|
|
@@ -1248,10 +1250,11 @@ async function scrapeHAnimeDetails(url) {
|
|
| 1248 |
await page.waitForSelector("body > div > iframe", { timeout: 20000 });
|
| 1249 |
} else {
|
| 1250 |
console.log("Tombol play tidak ditemukan");
|
| 1251 |
-
}
|
| 1252 |
|
| 1253 |
const iframeSrc = await page.evaluate(() => {
|
| 1254 |
-
|
|
|
|
| 1255 |
return iframe ? iframe.src : null;
|
| 1256 |
});
|
| 1257 |
|
|
|
|
| 1240 |
});
|
| 1241 |
|
| 1242 |
console.log("Result Metadata:", result);
|
| 1243 |
+
|
| 1244 |
+
/*
|
| 1245 |
|
| 1246 |
const playButtonSelector = "body > div > div.play.p-pulse";
|
| 1247 |
if (await page.$(playButtonSelector)) {
|
|
|
|
| 1250 |
await page.waitForSelector("body > div > iframe", { timeout: 20000 });
|
| 1251 |
} else {
|
| 1252 |
console.log("Tombol play tidak ditemukan");
|
| 1253 |
+
}*/
|
| 1254 |
|
| 1255 |
const iframeSrc = await page.evaluate(() => {
|
| 1256 |
+
await page.waitForSelector("body > main > div.player.mgt.mgb2 > div.vdplbx.c-df > aside.vdpl.fg1 > div > iframe", { timeout: 20000 });
|
| 1257 |
+
const iframe = document.querySelector("body > main > div.player.mgt.mgb2 > div.vdplbx.c-df > aside.vdpl.fg1 > div > iframe");
|
| 1258 |
return iframe ? iframe.src : null;
|
| 1259 |
});
|
| 1260 |
|