Closed calvinomiguel closed 2 years ago
Hi there,
in version 11.1.0
a companyImgLink
field has been added which points to the company media logo. Give it a go and let me know!
Unfortunatelly this one it's not working. the object property companyImgLink
is returning nothing.
Seems to work fine here
That's weird. Can you show me thw rest of your code?
I've reinstalled the setup 3 times already. Still no companyImg. Not sure what's going on. When I log the data object, there is no companyImgLink property to be seen. This is what I get:
Please make sure you are running with authenticated session (coookie set). Anonymous session is no longer supported.
This is a sample code I have just tested:
const {
LinkedinScraper,
events,
} = require("linkedin-jobs-scraper");
(async () => {
const scraper = new LinkedinScraper({
headless: true,
slowMo: 200,
args: [
"--lang=en-GB",
],
});
// Add listeners for scraper events
scraper.on(events.scraper.data, (data) => {
console.log(
`Id='${data.jobId}'`,
`Title='${data.title}'`,
`Place='${data.place}'`,
`Company='${data.company ? data.company : "N/A"}'`,
`Location='${data.location}'`,
`Link='${data.link}'`,
`CompanyLink='${data.companyLink ? data.companyLink : "N/A"}'`,
`CompanyImgLink='${data.companyImgLink ? data.companyImgLink : "N/A"}'`,
);
console.log('------------------------------------------------------------------------------');
});
await Promise.all([
scraper.run([
{
query: "Engineer",
options: {
limit: 10,
optimize: false,
locations: ["United States"],
}
}
])
]);
await scraper.close();
})();
I'm pretty sure, I am using a cookie, but I'll try later again. Thanks for the clue ;-)
This is not a bug, but a feature request. It' be great to be able to get the img of company's profile.
Thank you so much for this tool!