diff --git a/controllers/linkedin.js b/controllers/linkedin.js index 5dda918..a0558ae 100644 --- a/controllers/linkedin.js +++ b/controllers/linkedin.js @@ -160,10 +160,6 @@ const scrapeLinkedInProfile = async (user) => { ); return { - img: UserImg || null, - email: UserEmail || null, - linkedinUrl: profileUrl || null, - name: getText("h1"), headline: getText("div.text-body-medium.break-words"), location: getText( @@ -178,6 +174,11 @@ const scrapeLinkedInProfile = async (user) => { }; }); + // Ajoute les infos supplémentaires avant de retourner + profileData.img = UserImg || null; + profileData.email = UserEmail || null; + profileData.linkedinUrl = profileUrl || null; + await page.screenshot({ path: "public/error/step5_data_extracted.png", fullPage: true,