better-ani-scraped 1.2.6 → 1.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/scrapers/animesama.js +3 -0
package/package.json
CHANGED
package/scrapers/animesama.js
CHANGED
|
@@ -128,10 +128,13 @@ export async function getSeasons(animeUrl, language = "vostfr") {
|
|
|
128
128
|
export async function getEpisodeTitles(animeUrl) {
|
|
129
129
|
let browser;
|
|
130
130
|
try {
|
|
131
|
+
const puppeteer = await import('puppeteer');
|
|
131
132
|
browser = await puppeteer.launch({
|
|
132
133
|
headless: true,
|
|
134
|
+
executablePath: puppeteer.executablePath(),
|
|
133
135
|
args: ['--no-sandbox', '--disable-setuid-sandbox']
|
|
134
136
|
});
|
|
137
|
+
console.log("Chrome utilisé:", puppeteer.executablePath());
|
|
135
138
|
const page = await browser.newPage();
|
|
136
139
|
await page.setRequestInterception(true);
|
|
137
140
|
page.on('request', (req) => {
|