This commit is contained in:
AMAICDAX 2025-09-09 16:35:28 +02:00
parent 07a0052624
commit 01d79c06da

View file

@ -116,12 +116,34 @@ const scrapeLinkedInProfile = async (profileUrl) => {
]);
console.log("Logged in");
// Aller sur le profil et attendre le contenu
await page.goto(profileUrl, {
waitUntil: "domcontentloaded",
timeout: 60000,
});
await page.waitForSelector("h1", { timeout: 60000 });
// Scroll pour charger lazy sections
await page.evaluate(() => window.scrollBy(0, window.innerHeight));
await page.waitForTimeout(2000);
// 2. Aller sur le profil
await page.goto(profileUrl, {
waitUntil: "domcontentloaded",
timeout: 60000,
});
// Aller sur le profil et attendre le contenu
await page.goto(profileUrl, {
waitUntil: "domcontentloaded",
timeout: 60000,
});
await page.waitForSelector("h1", { timeout: 60000 });
// Scroll pour charger lazy sections
await page.evaluate(() => window.scrollBy(0, window.innerHeight));
await page.waitForTimeout(2000);
// 3. Extraire infos
const profileData = await page.evaluate(() => {
const getText = (selector) =>