Spaces:
Paused
Paused
Update index.js
Browse files
index.js
CHANGED
|
@@ -1186,6 +1186,7 @@ async function scrapeHAnime(query) {
|
|
| 1186 |
}
|
| 1187 |
return null;
|
| 1188 |
});
|
|
|
|
| 1189 |
|
| 1190 |
const result = {
|
| 1191 |
next: nextPage ? `${baseUrl}/page/${nextPage}/?s=${encodeURIComponent(query)}` : null,
|
|
@@ -1196,7 +1197,7 @@ async function scrapeHAnime(query) {
|
|
| 1196 |
return result;
|
| 1197 |
|
| 1198 |
} catch (error) {
|
| 1199 |
-
console.
|
| 1200 |
await browser.close();
|
| 1201 |
return { next: null, videos: [] };
|
| 1202 |
}
|
|
|
|
| 1186 |
}
|
| 1187 |
return null;
|
| 1188 |
});
|
| 1189 |
+
console.log(videos)
|
| 1190 |
|
| 1191 |
const result = {
|
| 1192 |
next: nextPage ? `${baseUrl}/page/${nextPage}/?s=${encodeURIComponent(query)}` : null,
|
|
|
|
| 1197 |
return result;
|
| 1198 |
|
| 1199 |
} catch (error) {
|
| 1200 |
+
console.log("Error scraping data:", error);
|
| 1201 |
await browser.close();
|
| 1202 |
return { next: null, videos: [] };
|
| 1203 |
}
|