Spaces:
Running
Running
Update index.js
Browse files
index.js
CHANGED
@@ -1241,19 +1241,9 @@ async function scrapeHAnimeDetails(url) {
|
|
1241 |
|
1242 |
console.log("Result Metadata:", result);
|
1243 |
|
1244 |
-
|
1245 |
-
|
1246 |
-
const playButtonSelector = "body > div > div.play.p-pulse";
|
1247 |
-
if (await page.$(playButtonSelector)) {
|
1248 |
-
console.log("Klik tombol play...");
|
1249 |
-
await page.click(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 |
});
|
|
|
1241 |
|
1242 |
console.log("Result Metadata:", result);
|
1243 |
|
1244 |
+
await page.waitForSelector("body > main > div.player.mgt.mgb2 > div.vdplbx.c-df > aside.vdpl.fg1 > div > iframe", { timeout: 20000 });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1245 |
|
1246 |
const iframeSrc = await page.evaluate(() => {
|
|
|
1247 |
const iframe = document.querySelector("body > main > div.player.mgt.mgb2 > div.vdplbx.c-df > aside.vdpl.fg1 > div > iframe");
|
1248 |
return iframe ? iframe.src : null;
|
1249 |
});
|