1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "postUrls": [
10 "https://www.linkedin.com/posts/retentionadam_koala-shut-down-and-unify-raised-40m-at-activity-7354228611756810240-qVxd",
11 "https://www.linkedin.com/posts/alex-vacca_all-in-on-prospecting-tools-ugcPost-7354111374249123840-Ip5i",
12 ],
13 "cookies": "[{\"name\":\"li_at\",\"value\":\"YOUR_LI_AT_VALUE\"},{\"name\":\"JSESSIONID\",\"value\":\"YOUR_JSESSIONID_VALUE\"},{\"name\":\"bcookie\",\"value\":\"YOUR_BCOOKIE_VALUE\"}]",
14 "proxyConfiguration": {
15 "useApifyProxy": False,
16 "apifyProxyGroups": ["RESIDENTIAL"],
17 },
18}
19
20
21run = client.actor("capable_cauldron/linkedin-comment-scraper").call(run_input=run_input)
22
23
24print("๐พ Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
25for item in client.dataset(run["defaultDatasetId"]).iterate_items():
26 print(item)
27
28