Linkedin post reactions scraper avatar

Linkedin post reactions scraper

Try for free

3 days trial then $13.00/month - No credit card required now

Go to Store
Linkedin post reactions scraper

Linkedin post reactions scraper

curious_coder/linkedin-post-reactions-scraper
Try for free

3 days trial then $13.00/month - No credit card required now

Scrape reactions or likes from linkedin post

OC

`TypeError` in `linkedin.js`: Unable to Read Null Property

Closed

orchid_clamp opened this issue
a year ago

An error occurs in linkedin.js at line 40 when attempting to access matches[1] from a null matches object, leading to a TypeError. The error is observed during the page fetch process in the Docker container. It suggests potential issues with regex matching or parsing within the related methods. The system runs on Apify version 3.1.5, Node version v16.20.1, and Linux OS.

curious_coder avatar

Glad you reported this issue. Fix has been done.

OC

orchid_clamp

a year ago

You sure? Still get the same error:

2023-09-06T13:14:13.015Z ACTOR: Pulling Docker image from repository. 2023-09-06T13:14:14.028Z ACTOR: Creating Docker container. 2023-09-06T13:14:14.172Z ACTOR: Starting Docker container. 2023-09-06T13:14:16.260Z INFO System info {"apifyVersion":"3.1.5","apifyClientVersion":"2.7.1","crawleeVersion":"3.3.3","osType":"Linux","nodeVersion":"v16.20.2"} 2023-09-06T13:14:16.574Z INFO Fetching page 0 2023-09-06T13:14:16.728Z file:///usr/src/app/src/linkedin.js:44 2023-09-06T13:14:16.730Z return body.elements[0] 2023-09-06T13:14:16.733Z ^ 2023-09-06T13:14:16.736Z 2023-09-06T13:14:16.738Z TypeError: Cannot read properties of undefined (reading '0') 2023-09-06T13:14:16.742Z at Client.getPostByUrl (file:///usr/src/app/src/linkedin.js:44:24) 2023-09-06T13:14:16.745Z at processTicksAndRejections (node:internal/process/task_queues:96:5) 2023-09-06T13:14:16.748Z at async Client.getActivityIdFromPostUrl (file:///usr/src/app/src/linkedin.js:29:23) 2023-09-06T13:14:16.750Z at async file:///usr/src/app/src/main.js:17:18

curious_coder avatar

I checked again with exact input you have used in the run you have shared. I got an error, but it was different than one you have shared in last message, but i fixed it and pushed another update.

Did you try with a different URL ? if yes, give me the new URL

OC

orchid_clamp

a year ago

Hi! So I am running it with thus URL:

https://www.linkedin.com/feed/update/urn:li:activity:7104750023355047937/

Receiving these logs:

2023-09-07T08:46:50.305Z ACTOR: Pulling Docker image from repository. 2023-09-07T08:46:51.566Z ACTOR: Creating Docker container. 2023-09-07T08:46:51.974Z ACTOR: Starting Docker container. 2023-09-07T08:46:53.699Z INFO System info {"apifyVersion":"3.1.5","apifyClientVersion":"2.7.1","crawleeVersion":"3.3.3","osType":"Linux","nodeVersion":"v16.20.2"} 2023-09-07T08:46:53.808Z INFO Fetching page 1 2023-09-07T08:46:54.454Z file:///usr/src/app/src/linkedin.js:79 2023-09-07T08:46:54.457Z connectionType: item.reactorLockup.label.text, 2023-09-07T08:46:54.459Z ^ 2023-09-07T08:46:54.463Z 2023-09-07T08:46:54.466Z TypeError: Cannot read properties of undefined (reading 'text') 2023-09-07T08:46:54.468Z at file:///usr/src/app/src/linkedin.js:79:58 2023-09-07T08:46:54.471Z at Array.map () 2023-09-07T08:46:54.473Z at Client.fetchReactedPeople (file:///usr/src/app/src/linkedin.js:71:35) 2023-09-07T08:46:54.475Z at processTicksAndRejections (node:internal/process/task_queues:96:5) 2023-09-07T08:46:54.478Z at async file:///usr/src/app/src/main.js:18:19

I also ran it with this URL: https://www.linkedin.com/posts/edhec-augmented-law-institute_accord-g7-que-pensez-dun-imp%C3%B4t-minimum-activity-6807702379925000192-WWeV/

and got these logs: 20... [trimmed]

curious_coder avatar

Done. Both are fixed in build 1.0.7

OC

orchid_clamp

a year ago

Like a charm, thanks a lot!

Developer
Maintained by Community

Actor Metrics

  • 36 monthly users

  • 7 stars

  • 94% runs succeeded

  • 7.3 days response time

  • Created in Jul 2023

  • Modified 3 months ago

Categories