Linkedin post scraper
3 days trial then $30.00/month - No credit card required now
Linkedin post scraper
3 days trial then $30.00/month - No credit card required now
Scrape linkedin posts or updates from linkedin post search results. Supports advanced linkedin search filters. Extract posts from any linkedin member
Hi, I am currently working on using the post scraper programmatically in nodejs. In order to get cookie data, I am using Puppeteer to login into Linkedin and save my cookie data that is later converted into JSON. When I use that cookie data in my input, I am met with the following error:
"There was an uncaught exception during the run of the Actor and it was not handled."
However, when I use the Cookie Editor manually it works fine. When comparing both cookie outputs. I notice slight differences. Is there a specific format that the cookies need to be in in order for this to work?
Yes there are some differences in cookie format between puppeteer and cookie-editor extension. For example, field name
should be renamed to key
when converting from puppeteer cookie.
You can compare a sample cookie and make necessary changes
Hi, I have worked to re-format what i am getting from Puppeteer and I am very stuck. I am getting the following error:
2024-11-01T19:33:06.317Z TypeError: Cannot read properties of undefined (reading 'startsWith') 2024-11-01T19:33:06.319Z at isSecurePrefixConditionMet (/usr/src/app/node_modules/tough-cookie/lib/cookie.js:650:22) 2024-11-01T19:33:06.321Z at CookieJar.setCookie (/usr/src/app/node_modules/tough-cookie/lib/cookie.js:1255:12) 2024-11-01T19:33:06.324Z at CookieJar.setCookie (/usr/src/app/node_modules/tough-cookie/node_modules/universalify/index.js:5:67) 2024-11-01T19:33:06.326Z at CookieJar.setCookieSync (/usr/src/app/node_modules/tough-cookie/lib/cookie.js:1728:17) 2024-11-01T19:33:06.328Z at file:///usr/src/app/src/helpers.js:54:9 2024-11-01T19:33:06.330Z at Array.forEach () 2024-11-01T19:33:06.332Z at Object.updateCookieJar (file:///usr/src/app/src/helpers.js:51:11) 2024-11-01T19:33:06.334Z at new Client (file:///usr/src/app/src/linkedin.js:20:21) 2024-11-01T19:33:06.337Z at file:///usr/src/app/src/main.js:79:16 2024-11-01T19:33:06.339Z at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Based on the following cookie format:
[ { "key": "__cf_bm", "value": "...", "domain": ".linkedin.com", "path": "/", "expires": 1730487049.232516, "secure": true, "httpOnly": true
1}, 2{ 3 "key": "lidc", 4 "value": "...",
... [trimmed]
Sorry, it was my mistake, My previous advice was wrong.
Actual mistake is you've passed the cookies as array of stringified json cookies.
You should not stringify the individual cookie object inside arrays. Instead pass the cookie array as object of arrays and stringify the entire input the actor as JSON
Actor Metrics
479 monthly users
-
79 stars
93% runs succeeded
4.5 days response time
Created in Jun 2023
Modified 24 days ago