@lhremote/core 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdp/app-discovery.d.ts +57 -0
- package/dist/cdp/app-discovery.d.ts.map +1 -1
- package/dist/cdp/app-discovery.js +90 -7
- package/dist/cdp/app-discovery.js.map +1 -1
- package/dist/cdp/app-discovery.test.js +180 -9
- package/dist/cdp/app-discovery.test.js.map +1 -1
- package/dist/cdp/client.d.ts +8 -1
- package/dist/cdp/client.d.ts.map +1 -1
- package/dist/cdp/client.js +8 -1
- package/dist/cdp/client.js.map +1 -1
- package/dist/cdp/discovery.d.ts.map +1 -1
- package/dist/cdp/discovery.js +5 -1
- package/dist/cdp/discovery.js.map +1 -1
- package/dist/cdp/discovery.test.js +7 -0
- package/dist/cdp/discovery.test.js.map +1 -1
- package/dist/cdp/index.d.ts +1 -1
- package/dist/cdp/index.d.ts.map +1 -1
- package/dist/cdp/index.js +1 -1
- package/dist/cdp/index.js.map +1 -1
- package/dist/cdp/instance-discovery.d.ts.map +1 -1
- package/dist/cdp/instance-discovery.js +25 -10
- package/dist/cdp/instance-discovery.js.map +1 -1
- package/dist/cdp/instance-discovery.test.js +17 -0
- package/dist/cdp/instance-discovery.test.js.map +1 -1
- package/dist/cdp/testing/launch-chromium.d.ts +1 -1
- package/dist/cdp/testing/launch-chromium.js +2 -2
- package/dist/db/client.d.ts.map +1 -1
- package/dist/db/client.js +3 -0
- package/dist/db/client.js.map +1 -1
- package/dist/db/repositories/collection-list.integration.test.js +6 -4
- package/dist/db/repositories/collection-list.integration.test.js.map +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/linkedin/dom-automation-retry.test.d.ts +2 -0
- package/dist/linkedin/dom-automation-retry.test.d.ts.map +1 -0
- package/dist/linkedin/dom-automation-retry.test.js +51 -0
- package/dist/linkedin/dom-automation-retry.test.js.map +1 -0
- package/dist/linkedin/dom-automation.d.ts +160 -3
- package/dist/linkedin/dom-automation.d.ts.map +1 -1
- package/dist/linkedin/dom-automation.js +489 -14
- package/dist/linkedin/dom-automation.js.map +1 -1
- package/dist/linkedin/humanized-mouse.d.ts +69 -0
- package/dist/linkedin/humanized-mouse.d.ts.map +1 -0
- package/dist/linkedin/humanized-mouse.js +109 -0
- package/dist/linkedin/humanized-mouse.js.map +1 -0
- package/dist/linkedin/index.d.ts +2 -1
- package/dist/linkedin/index.d.ts.map +1 -1
- package/dist/linkedin/index.js +2 -1
- package/dist/linkedin/index.js.map +1 -1
- package/dist/operations/add-people-to-collection.d.ts +1 -1
- package/dist/operations/add-people-to-collection.d.ts.map +1 -1
- package/dist/operations/add-people-to-collection.js +3 -6
- package/dist/operations/add-people-to-collection.js.map +1 -1
- package/dist/operations/build-linkedin-url.test.d.ts +2 -0
- package/dist/operations/build-linkedin-url.test.d.ts.map +1 -0
- package/dist/operations/build-linkedin-url.test.js +158 -0
- package/dist/operations/build-linkedin-url.test.js.map +1 -0
- package/dist/operations/campaign-add-action.d.ts +1 -1
- package/dist/operations/campaign-add-action.d.ts.map +1 -1
- package/dist/operations/campaign-add-action.js +3 -6
- package/dist/operations/campaign-add-action.js.map +1 -1
- package/dist/operations/campaign-create.d.ts +1 -1
- package/dist/operations/campaign-create.d.ts.map +1 -1
- package/dist/operations/campaign-create.js +3 -6
- package/dist/operations/campaign-create.js.map +1 -1
- package/dist/operations/campaign-delete.d.ts +1 -1
- package/dist/operations/campaign-delete.d.ts.map +1 -1
- package/dist/operations/campaign-delete.js +3 -6
- package/dist/operations/campaign-delete.js.map +1 -1
- package/dist/operations/campaign-erase.d.ts +1 -1
- package/dist/operations/campaign-erase.d.ts.map +1 -1
- package/dist/operations/campaign-erase.js +3 -6
- package/dist/operations/campaign-erase.js.map +1 -1
- package/dist/operations/campaign-exclude-add.d.ts +1 -1
- package/dist/operations/campaign-exclude-add.d.ts.map +1 -1
- package/dist/operations/campaign-exclude-add.js +3 -6
- package/dist/operations/campaign-exclude-add.js.map +1 -1
- package/dist/operations/campaign-exclude-list.d.ts +1 -1
- package/dist/operations/campaign-exclude-list.d.ts.map +1 -1
- package/dist/operations/campaign-exclude-list.js +3 -6
- package/dist/operations/campaign-exclude-list.js.map +1 -1
- package/dist/operations/campaign-exclude-remove.d.ts +1 -1
- package/dist/operations/campaign-exclude-remove.d.ts.map +1 -1
- package/dist/operations/campaign-exclude-remove.js +3 -6
- package/dist/operations/campaign-exclude-remove.js.map +1 -1
- package/dist/operations/campaign-export.d.ts +1 -1
- package/dist/operations/campaign-export.d.ts.map +1 -1
- package/dist/operations/campaign-export.js +3 -6
- package/dist/operations/campaign-export.js.map +1 -1
- package/dist/operations/campaign-get.d.ts +1 -1
- package/dist/operations/campaign-get.d.ts.map +1 -1
- package/dist/operations/campaign-get.js +3 -6
- package/dist/operations/campaign-get.js.map +1 -1
- package/dist/operations/campaign-list-people.d.ts +1 -1
- package/dist/operations/campaign-list-people.d.ts.map +1 -1
- package/dist/operations/campaign-list-people.js +3 -6
- package/dist/operations/campaign-list-people.js.map +1 -1
- package/dist/operations/campaign-list.d.ts +1 -1
- package/dist/operations/campaign-list.d.ts.map +1 -1
- package/dist/operations/campaign-list.js +3 -6
- package/dist/operations/campaign-list.js.map +1 -1
- package/dist/operations/campaign-move-next.d.ts +1 -1
- package/dist/operations/campaign-move-next.d.ts.map +1 -1
- package/dist/operations/campaign-move-next.js +3 -6
- package/dist/operations/campaign-move-next.js.map +1 -1
- package/dist/operations/campaign-remove-action.d.ts +1 -1
- package/dist/operations/campaign-remove-action.d.ts.map +1 -1
- package/dist/operations/campaign-remove-action.js +3 -6
- package/dist/operations/campaign-remove-action.js.map +1 -1
- package/dist/operations/campaign-remove-people.d.ts +1 -1
- package/dist/operations/campaign-remove-people.d.ts.map +1 -1
- package/dist/operations/campaign-remove-people.js +3 -6
- package/dist/operations/campaign-remove-people.js.map +1 -1
- package/dist/operations/campaign-reorder-actions.d.ts +1 -1
- package/dist/operations/campaign-reorder-actions.d.ts.map +1 -1
- package/dist/operations/campaign-reorder-actions.js +3 -6
- package/dist/operations/campaign-reorder-actions.js.map +1 -1
- package/dist/operations/campaign-retry.d.ts +1 -1
- package/dist/operations/campaign-retry.d.ts.map +1 -1
- package/dist/operations/campaign-retry.js +3 -6
- package/dist/operations/campaign-retry.js.map +1 -1
- package/dist/operations/campaign-start.d.ts +1 -1
- package/dist/operations/campaign-start.d.ts.map +1 -1
- package/dist/operations/campaign-start.js +3 -6
- package/dist/operations/campaign-start.js.map +1 -1
- package/dist/operations/campaign-statistics.d.ts +1 -1
- package/dist/operations/campaign-statistics.d.ts.map +1 -1
- package/dist/operations/campaign-statistics.js +3 -6
- package/dist/operations/campaign-statistics.js.map +1 -1
- package/dist/operations/campaign-status.d.ts +1 -1
- package/dist/operations/campaign-status.d.ts.map +1 -1
- package/dist/operations/campaign-status.js +3 -6
- package/dist/operations/campaign-status.js.map +1 -1
- package/dist/operations/campaign-stop.d.ts +1 -1
- package/dist/operations/campaign-stop.d.ts.map +1 -1
- package/dist/operations/campaign-stop.js +3 -6
- package/dist/operations/campaign-stop.js.map +1 -1
- package/dist/operations/campaign-update-action.d.ts +1 -1
- package/dist/operations/campaign-update-action.d.ts.map +1 -1
- package/dist/operations/campaign-update-action.js +3 -6
- package/dist/operations/campaign-update-action.js.map +1 -1
- package/dist/operations/campaign-update.d.ts +1 -1
- package/dist/operations/campaign-update.d.ts.map +1 -1
- package/dist/operations/campaign-update.js +3 -6
- package/dist/operations/campaign-update.js.map +1 -1
- package/dist/operations/check-replies.d.ts +3 -1
- package/dist/operations/check-replies.d.ts.map +1 -1
- package/dist/operations/check-replies.js +132 -17
- package/dist/operations/check-replies.js.map +1 -1
- package/dist/operations/check-replies.test.js +177 -17
- package/dist/operations/check-replies.test.js.map +1 -1
- package/dist/operations/collect-people.d.ts +1 -1
- package/dist/operations/collect-people.d.ts.map +1 -1
- package/dist/operations/collect-people.js +3 -6
- package/dist/operations/collect-people.js.map +1 -1
- package/dist/operations/comment-on-post.d.ts +4 -1
- package/dist/operations/comment-on-post.d.ts.map +1 -1
- package/dist/operations/comment-on-post.js +15 -19
- package/dist/operations/comment-on-post.js.map +1 -1
- package/dist/operations/comment-on-post.test.js +8 -6
- package/dist/operations/comment-on-post.test.js.map +1 -1
- package/dist/operations/create-collection.d.ts +1 -1
- package/dist/operations/create-collection.d.ts.map +1 -1
- package/dist/operations/create-collection.js +3 -6
- package/dist/operations/create-collection.js.map +1 -1
- package/dist/operations/delete-collection.d.ts +1 -1
- package/dist/operations/delete-collection.d.ts.map +1 -1
- package/dist/operations/delete-collection.js +3 -6
- package/dist/operations/delete-collection.js.map +1 -1
- package/dist/operations/dismiss-errors.d.ts +7 -4
- package/dist/operations/dismiss-errors.d.ts.map +1 -1
- package/dist/operations/dismiss-errors.js +52 -33
- package/dist/operations/dismiss-errors.js.map +1 -1
- package/dist/operations/dismiss-errors.test.js +53 -6
- package/dist/operations/dismiss-errors.test.js.map +1 -1
- package/dist/operations/endorse-skills.test.d.ts +2 -0
- package/dist/operations/endorse-skills.test.d.ts.map +1 -0
- package/dist/operations/endorse-skills.test.js +70 -0
- package/dist/operations/endorse-skills.test.js.map +1 -0
- package/dist/operations/enrich-profile.test.d.ts +2 -0
- package/dist/operations/enrich-profile.test.d.ts.map +1 -0
- package/dist/operations/enrich-profile.test.js +73 -0
- package/dist/operations/enrich-profile.test.js.map +1 -0
- package/dist/operations/ephemeral-action.d.ts +1 -1
- package/dist/operations/ephemeral-action.d.ts.map +1 -1
- package/dist/operations/ephemeral-action.js +3 -6
- package/dist/operations/ephemeral-action.js.map +1 -1
- package/dist/operations/ephemeral-action.test.d.ts +2 -0
- package/dist/operations/ephemeral-action.test.d.ts.map +1 -0
- package/dist/operations/ephemeral-action.test.js +140 -0
- package/dist/operations/ephemeral-action.test.js.map +1 -0
- package/dist/operations/follow-person.test.d.ts +2 -0
- package/dist/operations/follow-person.test.d.ts.map +1 -0
- package/dist/operations/follow-person.test.js +57 -0
- package/dist/operations/follow-person.test.js.map +1 -0
- package/dist/operations/get-action-budget.d.ts +1 -1
- package/dist/operations/get-action-budget.d.ts.map +1 -1
- package/dist/operations/get-action-budget.js +3 -6
- package/dist/operations/get-action-budget.js.map +1 -1
- package/dist/operations/get-errors.d.ts +5 -1
- package/dist/operations/get-errors.d.ts.map +1 -1
- package/dist/operations/get-errors.js +55 -33
- package/dist/operations/get-errors.js.map +1 -1
- package/dist/operations/get-errors.test.js +54 -55
- package/dist/operations/get-errors.test.js.map +1 -1
- package/dist/operations/get-feed.d.ts +83 -4
- package/dist/operations/get-feed.d.ts.map +1 -1
- package/dist/operations/get-feed.js +400 -153
- package/dist/operations/get-feed.js.map +1 -1
- package/dist/operations/get-feed.test.js +416 -190
- package/dist/operations/get-feed.test.js.map +1 -1
- package/dist/operations/get-post-engagers.d.ts +6 -3
- package/dist/operations/get-post-engagers.d.ts.map +1 -1
- package/dist/operations/get-post-engagers.js +278 -78
- package/dist/operations/get-post-engagers.js.map +1 -1
- package/dist/operations/get-post-engagers.test.js +292 -14
- package/dist/operations/get-post-engagers.test.js.map +1 -1
- package/dist/operations/get-post-stats.d.ts +8 -3
- package/dist/operations/get-post-stats.d.ts.map +1 -1
- package/dist/operations/get-post-stats.js +101 -37
- package/dist/operations/get-post-stats.js.map +1 -1
- package/dist/operations/get-post-stats.test.js +137 -2
- package/dist/operations/get-post-stats.test.js.map +1 -1
- package/dist/operations/get-post.d.ts +9 -150
- package/dist/operations/get-post.d.ts.map +1 -1
- package/dist/operations/get-post.js +356 -210
- package/dist/operations/get-post.js.map +1 -1
- package/dist/operations/get-post.test.js +210 -387
- package/dist/operations/get-post.test.js.map +1 -1
- package/dist/operations/get-profile-activity.d.ts +13 -92
- package/dist/operations/get-profile-activity.d.ts.map +1 -1
- package/dist/operations/get-profile-activity.js +305 -105
- package/dist/operations/get-profile-activity.js.map +1 -1
- package/dist/operations/get-profile-activity.test.js +277 -158
- package/dist/operations/get-profile-activity.test.js.map +1 -1
- package/dist/operations/get-throttle-status.d.ts +1 -1
- package/dist/operations/get-throttle-status.d.ts.map +1 -1
- package/dist/operations/get-throttle-status.js +4 -10
- package/dist/operations/get-throttle-status.js.map +1 -1
- package/dist/operations/import-people-from-collection.d.ts +1 -1
- package/dist/operations/import-people-from-collection.d.ts.map +1 -1
- package/dist/operations/import-people-from-collection.js +3 -6
- package/dist/operations/import-people-from-collection.js.map +1 -1
- package/dist/operations/import-people-from-urls.d.ts +1 -1
- package/dist/operations/import-people-from-urls.d.ts.map +1 -1
- package/dist/operations/import-people-from-urls.js +3 -6
- package/dist/operations/import-people-from-urls.js.map +1 -1
- package/dist/operations/index.d.ts +2 -2
- package/dist/operations/index.d.ts.map +1 -1
- package/dist/operations/index.js +2 -1
- package/dist/operations/index.js.map +1 -1
- package/dist/operations/like-person-posts.test.d.ts +2 -0
- package/dist/operations/like-person-posts.test.d.ts.map +1 -0
- package/dist/operations/like-person-posts.test.js +103 -0
- package/dist/operations/like-person-posts.test.js.map +1 -0
- package/dist/operations/list-collections.d.ts +1 -1
- package/dist/operations/list-collections.d.ts.map +1 -1
- package/dist/operations/list-collections.js +3 -6
- package/dist/operations/list-collections.js.map +1 -1
- package/dist/operations/message-person.test.d.ts +2 -0
- package/dist/operations/message-person.test.d.ts.map +1 -0
- package/dist/operations/message-person.test.js +108 -0
- package/dist/operations/message-person.test.js.map +1 -0
- package/dist/operations/navigate-away.d.ts +14 -0
- package/dist/operations/navigate-away.d.ts.map +1 -0
- package/dist/operations/navigate-away.js +24 -0
- package/dist/operations/navigate-away.js.map +1 -0
- package/dist/operations/navigate-away.test.d.ts +2 -0
- package/dist/operations/navigate-away.test.d.ts.map +1 -0
- package/dist/operations/navigate-away.test.js +51 -0
- package/dist/operations/navigate-away.test.js.map +1 -0
- package/dist/operations/query-messages.d.ts +1 -1
- package/dist/operations/query-messages.d.ts.map +1 -1
- package/dist/operations/query-messages.js +3 -6
- package/dist/operations/query-messages.js.map +1 -1
- package/dist/operations/react-to-post.d.ts +3 -0
- package/dist/operations/react-to-post.d.ts.map +1 -1
- package/dist/operations/react-to-post.js +13 -15
- package/dist/operations/react-to-post.js.map +1 -1
- package/dist/operations/react-to-post.test.js +8 -5
- package/dist/operations/react-to-post.test.js.map +1 -1
- package/dist/operations/remove-connection.test.d.ts +2 -0
- package/dist/operations/remove-connection.test.d.ts.map +1 -0
- package/dist/operations/remove-connection.test.js +45 -0
- package/dist/operations/remove-connection.test.js.map +1 -0
- package/dist/operations/remove-people-from-collection.d.ts +1 -1
- package/dist/operations/remove-people-from-collection.d.ts.map +1 -1
- package/dist/operations/remove-people-from-collection.js +3 -6
- package/dist/operations/remove-people-from-collection.js.map +1 -1
- package/dist/operations/resolve-linkedin-entity.d.ts.map +1 -1
- package/dist/operations/resolve-linkedin-entity.js +2 -2
- package/dist/operations/resolve-linkedin-entity.js.map +1 -1
- package/dist/operations/resolve-linkedin-entity.test.d.ts +2 -0
- package/dist/operations/resolve-linkedin-entity.test.d.ts.map +1 -0
- package/dist/operations/resolve-linkedin-entity.test.js +343 -0
- package/dist/operations/resolve-linkedin-entity.test.js.map +1 -0
- package/dist/operations/scrape-messaging-history.d.ts +2 -1
- package/dist/operations/scrape-messaging-history.d.ts.map +1 -1
- package/dist/operations/scrape-messaging-history.js +121 -18
- package/dist/operations/scrape-messaging-history.js.map +1 -1
- package/dist/operations/scrape-messaging-history.test.js +134 -12
- package/dist/operations/scrape-messaging-history.test.js.map +1 -1
- package/dist/operations/search-posts.d.ts +20 -112
- package/dist/operations/search-posts.d.ts.map +1 -1
- package/dist/operations/search-posts.js +369 -170
- package/dist/operations/search-posts.js.map +1 -1
- package/dist/operations/search-posts.test.js +273 -234
- package/dist/operations/search-posts.test.js.map +1 -1
- package/dist/operations/send-inmail.test.d.ts +2 -0
- package/dist/operations/send-inmail.test.d.ts.map +1 -0
- package/dist/operations/send-inmail.test.js +108 -0
- package/dist/operations/send-inmail.test.js.map +1 -0
- package/dist/operations/send-invite.test.d.ts +2 -0
- package/dist/operations/send-invite.test.d.ts.map +1 -0
- package/dist/operations/send-invite.test.js +59 -0
- package/dist/operations/send-invite.test.js.map +1 -0
- package/dist/operations/types.d.ts +24 -1
- package/dist/operations/types.d.ts.map +1 -1
- package/dist/operations/types.js +13 -1
- package/dist/operations/types.js.map +1 -1
- package/dist/operations/visit-profile.d.ts +1 -1
- package/dist/operations/visit-profile.d.ts.map +1 -1
- package/dist/operations/visit-profile.js +3 -6
- package/dist/operations/visit-profile.js.map +1 -1
- package/dist/services/account-resolution.d.ts +9 -4
- package/dist/services/account-resolution.d.ts.map +1 -1
- package/dist/services/account-resolution.js +60 -5
- package/dist/services/account-resolution.js.map +1 -1
- package/dist/services/app.d.ts +6 -2
- package/dist/services/app.d.ts.map +1 -1
- package/dist/services/app.js +18 -6
- package/dist/services/app.js.map +1 -1
- package/dist/services/app.test.js +41 -7
- package/dist/services/app.test.js.map +1 -1
- package/dist/services/campaign.d.ts +34 -2
- package/dist/services/campaign.d.ts.map +1 -1
- package/dist/services/campaign.js +108 -1
- package/dist/services/campaign.js.map +1 -1
- package/dist/services/errors.d.ts +2 -1
- package/dist/services/errors.d.ts.map +1 -1
- package/dist/services/errors.js +6 -3
- package/dist/services/errors.js.map +1 -1
- package/dist/services/index.d.ts +0 -1
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +0 -1
- package/dist/services/index.js.map +1 -1
- package/dist/services/instance-context.d.ts +5 -1
- package/dist/services/instance-context.d.ts.map +1 -1
- package/dist/services/instance-context.js +87 -28
- package/dist/services/instance-context.js.map +1 -1
- package/dist/services/instance-context.test.js +5 -1
- package/dist/services/instance-context.test.js.map +1 -1
- package/dist/services/instance-lifecycle.d.ts.map +1 -1
- package/dist/services/instance-lifecycle.js +32 -1
- package/dist/services/instance-lifecycle.js.map +1 -1
- package/dist/services/instance-lifecycle.test.js +52 -1
- package/dist/services/instance-lifecycle.test.js.map +1 -1
- package/dist/services/instance.d.ts +19 -7
- package/dist/services/instance.d.ts.map +1 -1
- package/dist/services/instance.js +56 -17
- package/dist/services/instance.js.map +1 -1
- package/dist/services/instance.test.js +65 -0
- package/dist/services/instance.test.js.map +1 -1
- package/dist/services/launcher.d.ts +47 -3
- package/dist/services/launcher.d.ts.map +1 -1
- package/dist/services/launcher.js +205 -33
- package/dist/services/launcher.js.map +1 -1
- package/dist/services/launcher.test.js +133 -6
- package/dist/services/launcher.test.js.map +1 -1
- package/dist/services/status.d.ts +6 -2
- package/dist/services/status.d.ts.map +1 -1
- package/dist/services/status.js +67 -34
- package/dist/services/status.js.map +1 -1
- package/dist/services/status.test.js +9 -2
- package/dist/services/status.test.js.map +1 -1
- package/dist/testing/e2e-helpers.d.ts +23 -1
- package/dist/testing/e2e-helpers.d.ts.map +1 -1
- package/dist/testing/e2e-helpers.js +110 -5
- package/dist/testing/e2e-helpers.js.map +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +1 -1
- package/dist/testing/index.js.map +1 -1
- package/dist/types/account.d.ts +1 -1
- package/dist/types/feed.d.ts +1 -3
- package/dist/types/feed.d.ts.map +1 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/cdp-port.d.ts.map +1 -1
- package/dist/utils/cdp-port.js +3 -1
- package/dist/utils/cdp-port.js.map +1 -1
- package/dist/utils/cdp-port.test.js +1 -1
- package/dist/utils/cdp-port.test.js.map +1 -1
- package/dist/utils/delay.d.ts +79 -0
- package/dist/utils/delay.d.ts.map +1 -1
- package/dist/utils/delay.js +118 -0
- package/dist/utils/delay.js.map +1 -1
- package/dist/utils/delay.test.js +111 -1
- package/dist/utils/delay.test.js.map +1 -1
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +2 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/session-pacer.d.ts +27 -0
- package/dist/utils/session-pacer.d.ts.map +1 -0
- package/dist/utils/session-pacer.js +55 -0
- package/dist/utils/session-pacer.js.map +1 -0
- package/dist/utils/session-pacer.test.d.ts +2 -0
- package/dist/utils/session-pacer.test.d.ts.map +1 -0
- package/dist/utils/session-pacer.test.js +111 -0
- package/dist/utils/session-pacer.test.js.map +1 -0
- package/package.json +1 -1
- package/dist/linkedin/__tests__/selectors.integration.test.d.ts +0 -2
- package/dist/linkedin/__tests__/selectors.integration.test.d.ts.map +0 -1
- package/dist/linkedin/__tests__/selectors.integration.test.js +0 -258
- package/dist/linkedin/__tests__/selectors.integration.test.js.map +0 -1
- package/dist/types/search-posts.d.ts +0 -22
- package/dist/types/search-posts.d.ts.map +0 -1
- package/dist/types/search-posts.js +0 -4
- package/dist/types/search-posts.js.map +0 -1
- package/dist/voyager/index.d.ts +0 -2
- package/dist/voyager/index.d.ts.map +0 -1
- package/dist/voyager/index.js +0 -4
- package/dist/voyager/index.js.map +0 -1
- package/dist/voyager/interceptor.d.ts +0 -100
- package/dist/voyager/interceptor.d.ts.map +0 -1
- package/dist/voyager/interceptor.integration.test.d.ts +0 -2
- package/dist/voyager/interceptor.integration.test.d.ts.map +0 -1
- package/dist/voyager/interceptor.integration.test.js +0 -89
- package/dist/voyager/interceptor.integration.test.js.map +0 -1
- package/dist/voyager/interceptor.js +0 -235
- package/dist/voyager/interceptor.js.map +0 -1
- package/dist/voyager/interceptor.test.d.ts +0 -2
- package/dist/voyager/interceptor.test.d.ts.map +0 -1
- package/dist/voyager/interceptor.test.js +0 -372
- package/dist/voyager/interceptor.test.js.map +0 -1
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
2
|
// Copyright (C) 2026 Oleksii PELYKH
|
|
3
|
+
import { resolveInstancePort } from "../cdp/index.js";
|
|
3
4
|
import { CDPClient } from "../cdp/client.js";
|
|
4
5
|
import { discoverTargets } from "../cdp/discovery.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
6
|
+
import { navigateAwayIf } from "./navigate-away.js";
|
|
7
|
+
import { gaussianDelay, gaussianBetween, maybeHesitate, maybeBreak, simulateReadingTime } from "../utils/delay.js";
|
|
8
|
+
import { humanizedScrollToByIndex, humanizedScrollY, retryInteraction } from "../linkedin/dom-automation.js";
|
|
9
|
+
import { mapRawPosts, scrollFeed, delay, } from "./get-feed.js";
|
|
7
10
|
/** Regex to extract the public ID from a LinkedIn profile URL. */
|
|
8
11
|
const LINKEDIN_PROFILE_RE = /linkedin\.com\/in\/([^/?#]+)/;
|
|
9
12
|
/**
|
|
@@ -28,95 +31,215 @@ export function extractProfileId(input) {
|
|
|
28
31
|
"Expected a LinkedIn profile URL (https://www.linkedin.com/in/<id>) or a bare public ID.");
|
|
29
32
|
}
|
|
30
33
|
// ---------------------------------------------------------------------------
|
|
31
|
-
//
|
|
34
|
+
// Activity-page-specific DOM scraping
|
|
32
35
|
// ---------------------------------------------------------------------------
|
|
33
36
|
/**
|
|
34
|
-
*
|
|
37
|
+
* JavaScript evaluated inside the LinkedIn profile activity page.
|
|
38
|
+
*
|
|
39
|
+
* The activity page uses Ember.js rendering with `div[role="article"]`
|
|
40
|
+
* containers and stable class names (unlike the SSR main feed).
|
|
41
|
+
* Each post has a three-dot menu button matching
|
|
42
|
+
* `button[aria-label^="Open control menu"]`.
|
|
35
43
|
*/
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
44
|
+
const SCRAPE_ACTIVITY_POSTS_SCRIPT = `(() => {
|
|
45
|
+
const posts = [];
|
|
46
|
+
|
|
47
|
+
const articles = document.querySelectorAll('div[role="article"]');
|
|
48
|
+
for (const item of articles) {
|
|
49
|
+
if (item.offsetHeight < 100) continue;
|
|
50
|
+
|
|
51
|
+
const menuBtn = item.querySelector('button[aria-label^="Open control menu"]');
|
|
52
|
+
if (!menuBtn) continue;
|
|
53
|
+
|
|
54
|
+
// --- Author info ---
|
|
55
|
+
let authorName = null;
|
|
56
|
+
let authorHeadline = null;
|
|
57
|
+
let authorProfileUrl = null;
|
|
58
|
+
|
|
59
|
+
const authorLink = item.querySelector('a[href*="/in/"], a[href*="/company/"]');
|
|
60
|
+
if (authorLink) {
|
|
61
|
+
authorProfileUrl = authorLink.href.split('?')[0] || null;
|
|
62
|
+
const nameEl = authorLink.querySelector('span[dir="ltr"], span[aria-hidden="true"]')
|
|
63
|
+
|| authorLink;
|
|
64
|
+
const rawName = (nameEl.textContent || '').trim();
|
|
65
|
+
authorName = rawName || null;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const allSpans = item.querySelectorAll('span');
|
|
69
|
+
for (const span of allSpans) {
|
|
70
|
+
const txt = (span.textContent || '').trim();
|
|
71
|
+
if (
|
|
72
|
+
txt &&
|
|
73
|
+
txt.length > 5 &&
|
|
74
|
+
txt.length < 200 &&
|
|
75
|
+
txt !== authorName &&
|
|
76
|
+
!txt.match(/^\\d+[smhdw]$/) &&
|
|
77
|
+
!txt.match(/^\\d[\\d,]*\\s+(reactions?|comments?|reposts?|likes?)$/i) &&
|
|
78
|
+
!txt.match(/^Follow$|^Promoted$/i)
|
|
79
|
+
) {
|
|
80
|
+
authorHeadline = txt;
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// --- Post text ---
|
|
86
|
+
let text = null;
|
|
87
|
+
const ltrSpans = item.querySelectorAll('span[dir="ltr"]');
|
|
88
|
+
let longestText = '';
|
|
89
|
+
for (const span of ltrSpans) {
|
|
90
|
+
const txt = (span.textContent || '').trim();
|
|
91
|
+
if (txt.length > longestText.length && txt !== authorName && txt !== authorHeadline) {
|
|
92
|
+
longestText = txt;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
if (longestText.length > 20) {
|
|
96
|
+
text = longestText;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// --- Media type ---
|
|
100
|
+
let mediaType = null;
|
|
101
|
+
if (item.querySelector('video')) {
|
|
102
|
+
mediaType = 'video';
|
|
103
|
+
} else if (item.querySelector('img[src*="media.licdn.com"]')) {
|
|
104
|
+
const imgs = item.querySelectorAll('img[src*="media.licdn.com"]');
|
|
105
|
+
for (const img of imgs) {
|
|
106
|
+
if (img.offsetHeight > 100) { mediaType = 'image'; break; }
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// --- Engagement counts ---
|
|
111
|
+
const itemText = item.textContent || '';
|
|
112
|
+
|
|
113
|
+
function parseCount(pattern) {
|
|
114
|
+
const m = itemText.match(pattern);
|
|
115
|
+
if (!m) return 0;
|
|
116
|
+
const raw = m[1].replace(/,/g, '');
|
|
117
|
+
const num = parseInt(raw, 10);
|
|
118
|
+
return isNaN(num) ? 0 : num;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
const reactionCount = parseCount(/(\\d[\\d,]*)\\s+reactions?/i);
|
|
122
|
+
const commentCount = parseCount(/(\\d[\\d,]*)\\s+comments?/i);
|
|
123
|
+
const shareCount = parseCount(/(\\d[\\d,]*)\\s+reposts?/i);
|
|
124
|
+
|
|
125
|
+
// --- Timestamp ---
|
|
126
|
+
let timestamp = null;
|
|
127
|
+
const timeEl = item.querySelector('time');
|
|
128
|
+
if (timeEl) {
|
|
129
|
+
const dt = timeEl.getAttribute('datetime');
|
|
130
|
+
if (dt) timestamp = dt;
|
|
131
|
+
}
|
|
132
|
+
if (!timestamp) {
|
|
133
|
+
const timeMatch = itemText.match(/(?:^|\\s)(\\d+[smhdw])(?:\\s|$|\\u00B7|\\xB7)/);
|
|
134
|
+
if (timeMatch) timestamp = timeMatch[1];
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
posts.push({
|
|
138
|
+
url: null,
|
|
139
|
+
authorName: authorName,
|
|
140
|
+
authorHeadline: authorHeadline,
|
|
141
|
+
authorProfileUrl: authorProfileUrl,
|
|
142
|
+
text: text,
|
|
143
|
+
mediaType: mediaType,
|
|
144
|
+
reactionCount: reactionCount,
|
|
145
|
+
commentCount: commentCount,
|
|
146
|
+
shareCount: shareCount,
|
|
147
|
+
timestamp: timestamp,
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
return posts;
|
|
152
|
+
})()`;
|
|
43
153
|
/**
|
|
44
|
-
*
|
|
154
|
+
* Wait for the profile activity page to render posts.
|
|
155
|
+
* Polls for `div[role="article"]` elements with menu buttons.
|
|
45
156
|
*/
|
|
46
|
-
function
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
157
|
+
async function waitForActivityLoad(client, timeoutMs = 15_000) {
|
|
158
|
+
const deadline = Date.now() + timeoutMs;
|
|
159
|
+
while (Date.now() < deadline) {
|
|
160
|
+
const ready = await client.evaluate(`(() => {
|
|
161
|
+
const articles = document.querySelectorAll('div[role="article"]');
|
|
162
|
+
for (const a of articles) {
|
|
163
|
+
if (a.querySelector('button[aria-label^="Open control menu"]')) {
|
|
164
|
+
return true;
|
|
51
165
|
}
|
|
166
|
+
}
|
|
167
|
+
return false;
|
|
168
|
+
})()`);
|
|
169
|
+
if (ready)
|
|
170
|
+
return;
|
|
171
|
+
await delay(500);
|
|
52
172
|
}
|
|
53
|
-
|
|
173
|
+
throw new Error("Timed out waiting for activity posts to appear in the DOM");
|
|
54
174
|
}
|
|
175
|
+
/** CSS selector for activity post menu buttons. */
|
|
176
|
+
const ACTIVITY_MENU_BUTTON_SELECTOR = 'div[role="article"] button[aria-label^="Open control menu"]';
|
|
55
177
|
/**
|
|
56
|
-
*
|
|
178
|
+
* Capture the post URL for a single activity post by opening its
|
|
179
|
+
* three-dot menu and clicking "Copy link to post".
|
|
57
180
|
*
|
|
58
|
-
*
|
|
181
|
+
* Requires the clipboard interceptor to be installed beforehand.
|
|
182
|
+
*
|
|
183
|
+
* @returns The post URL (query params stripped) or `null` if capture failed.
|
|
59
184
|
*/
|
|
60
|
-
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
if (
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
authorHeadline =
|
|
88
|
-
resolveText(profile.headline) ?? profile.occupation ?? null;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
185
|
+
async function captureActivityPostUrl(client, postIndex, mouse) {
|
|
186
|
+
const MAX_ATTEMPTS = 3;
|
|
187
|
+
for (let attempt = 0; attempt < MAX_ATTEMPTS; attempt++) {
|
|
188
|
+
await maybeHesitate(); // Probabilistic pause before menu interaction
|
|
189
|
+
// Reset clipboard capture
|
|
190
|
+
await client.evaluate(`window.__capturedClipboard = null;`);
|
|
191
|
+
// Scroll the menu button into view (humanized when mouse available)
|
|
192
|
+
await humanizedScrollToByIndex(client, ACTIVITY_MENU_BUTTON_SELECTOR, postIndex, mouse);
|
|
193
|
+
// Click the menu button
|
|
194
|
+
const clicked = await client.evaluate(`(() => {
|
|
195
|
+
const btns = document.querySelectorAll(
|
|
196
|
+
${JSON.stringify(ACTIVITY_MENU_BUTTON_SELECTOR)}
|
|
197
|
+
);
|
|
198
|
+
const btn = btns[${postIndex}];
|
|
199
|
+
if (!btn) return false;
|
|
200
|
+
btn.click();
|
|
201
|
+
return true;
|
|
202
|
+
})()`);
|
|
203
|
+
if (!clicked)
|
|
204
|
+
return null; // No menu button — structural, retrying won't help
|
|
205
|
+
await gaussianDelay(700, 100, 500, 900);
|
|
206
|
+
// Click "Copy link to post" menu item
|
|
207
|
+
await client.evaluate(`(() => {
|
|
208
|
+
for (const el of document.querySelectorAll('[role="menuitem"]')) {
|
|
209
|
+
if (el.textContent.trim() === 'Copy link to post') {
|
|
210
|
+
el.click();
|
|
211
|
+
return;
|
|
91
212
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
213
|
+
}
|
|
214
|
+
})()`);
|
|
215
|
+
await gaussianDelay(550, 75, 400, 700);
|
|
216
|
+
// Read captured URL
|
|
217
|
+
const postUrl = await client.evaluate(`window.__capturedClipboard`);
|
|
218
|
+
if (postUrl) {
|
|
219
|
+
// Strip query parameters
|
|
220
|
+
return postUrl.split("?")[0] ?? postUrl;
|
|
221
|
+
}
|
|
222
|
+
// Dismiss any open menu before retrying
|
|
223
|
+
await client.evaluate(`(() => {
|
|
224
|
+
document.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true }));
|
|
225
|
+
})()`);
|
|
226
|
+
// Escalating retry delays: longer waits on later attempts
|
|
227
|
+
const retryDelays = [
|
|
228
|
+
{ mean: 700, stdDev: 200 },
|
|
229
|
+
{ mean: 1_200, stdDev: 400 },
|
|
230
|
+
{ mean: 2_500, stdDev: 800 },
|
|
231
|
+
];
|
|
232
|
+
const rd = retryDelays[attempt] ?? retryDelays[2];
|
|
233
|
+
await gaussianDelay(rd.mean, rd.stdDev, rd.mean * 0.5, rd.mean * 1.5);
|
|
234
|
+
// 50% chance of a small "confusion" scroll to reset visual state
|
|
235
|
+
if (Math.random() < 0.5) {
|
|
236
|
+
const scrollDist = Math.round(gaussianBetween(75, 15, 50, 100));
|
|
237
|
+
const dir = Math.random() < 0.5 ? -1 : 1;
|
|
238
|
+
await humanizedScrollY(client, scrollDist * dir, 300, 400, mouse);
|
|
239
|
+
await gaussianDelay(300, 100, 150, 500);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
return null;
|
|
120
243
|
}
|
|
121
244
|
// ---------------------------------------------------------------------------
|
|
122
245
|
// Main operation
|
|
@@ -124,19 +247,20 @@ export function parseProfileUpdatesResponse(raw) {
|
|
|
124
247
|
/**
|
|
125
248
|
* Retrieve recent posts/activity from a LinkedIn profile.
|
|
126
249
|
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
250
|
+
* Navigates to the profile's activity page and extracts posts from the
|
|
251
|
+
* rendered DOM. The activity page uses Ember.js rendering with
|
|
252
|
+
* `div[role="article"]` containers (different from the SSR main feed).
|
|
253
|
+
* Supports cursor-based pagination via scrolling.
|
|
130
254
|
*
|
|
131
255
|
* @param input - Profile identifier, pagination, and CDP connection options.
|
|
132
|
-
* @returns List of posts with
|
|
256
|
+
* @returns List of posts with a cursor for the next page.
|
|
133
257
|
*/
|
|
134
258
|
export async function getProfileActivity(input) {
|
|
135
|
-
const cdpPort = input.cdpPort
|
|
259
|
+
const cdpPort = await resolveInstancePort(input.cdpPort, input.cdpHost);
|
|
136
260
|
const cdpHost = input.cdpHost ?? "127.0.0.1";
|
|
137
261
|
const allowRemote = input.allowRemote ?? false;
|
|
138
|
-
const count = input.count ??
|
|
139
|
-
const
|
|
262
|
+
const count = input.count ?? 10;
|
|
263
|
+
const cursor = input.cursor ?? null;
|
|
140
264
|
const profilePublicId = extractProfileId(input.profile);
|
|
141
265
|
// Enforce loopback guard
|
|
142
266
|
if (!allowRemote && cdpHost !== "127.0.0.1" && cdpHost !== "localhost") {
|
|
@@ -152,27 +276,103 @@ export async function getProfileActivity(input) {
|
|
|
152
276
|
const client = new CDPClient(cdpPort, { host: cdpHost, allowRemote });
|
|
153
277
|
await client.connect(linkedInTarget.id);
|
|
154
278
|
try {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
const
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
279
|
+
// Navigate away if already on the activity page to force a fresh load
|
|
280
|
+
await navigateAwayIf(client, "/recent-activity/");
|
|
281
|
+
const activityUrl = `https://www.linkedin.com/in/${encodeURIComponent(profilePublicId)}/recent-activity/all/`;
|
|
282
|
+
await client.navigate(activityUrl);
|
|
283
|
+
// Wait for activity posts to render
|
|
284
|
+
await waitForActivityLoad(client);
|
|
285
|
+
const mouse = input.mouse ?? null;
|
|
286
|
+
// Collect posts — scroll to load more if needed
|
|
287
|
+
const maxScrollAttempts = 10;
|
|
288
|
+
let allPosts = [];
|
|
289
|
+
let previousCount = 0;
|
|
290
|
+
const cursorUrl = cursor;
|
|
291
|
+
for (let scroll = 0; scroll <= maxScrollAttempts; scroll++) {
|
|
292
|
+
const countBeforeScroll = previousCount;
|
|
293
|
+
const scraped = await client.evaluate(SCRAPE_ACTIVITY_POSTS_SCRIPT);
|
|
294
|
+
allPosts = scraped ?? [];
|
|
295
|
+
const available = allPosts.length;
|
|
296
|
+
if (available >= count && !cursorUrl)
|
|
297
|
+
break;
|
|
298
|
+
// No new posts appeared after scroll — stop
|
|
299
|
+
if (allPosts.length === previousCount && scroll > 0)
|
|
300
|
+
break;
|
|
301
|
+
previousCount = allPosts.length;
|
|
302
|
+
// Scroll to load more
|
|
303
|
+
if (scroll < maxScrollAttempts) {
|
|
304
|
+
await scrollFeed(client, mouse);
|
|
305
|
+
// Progressive session fatigue: delays increase with each scroll
|
|
306
|
+
const fatigueMultiplier = 1 + scroll * 0.1;
|
|
307
|
+
// Scale delay by newly visible content volume
|
|
308
|
+
const newPostCount = allPosts.length - countBeforeScroll;
|
|
309
|
+
const contentBonus = Math.min(newPostCount * gaussianBetween(350, 75, 200, 500), 3_000);
|
|
310
|
+
await gaussianDelay(1_500 * fatigueMultiplier + contentBonus, 150 * fatigueMultiplier, 1_200 * fatigueMultiplier + contentBonus, 1_800 * fatigueMultiplier + contentBonus);
|
|
311
|
+
// Reading simulation: pause proportional to visible content volume.
|
|
312
|
+
// Estimate ~300 chars per newly visible post (headline + snippet).
|
|
313
|
+
if (newPostCount > 0) {
|
|
314
|
+
await simulateReadingTime(newPostCount * 300);
|
|
315
|
+
}
|
|
316
|
+
await maybeBreak();
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
// --- URL extraction phase ---
|
|
320
|
+
// Install clipboard interceptor (Electron's clipboard API is broken)
|
|
321
|
+
await client.evaluate(`navigator.clipboard.writeText = function(text) {
|
|
322
|
+
window.__capturedClipboard = text;
|
|
323
|
+
return Promise.resolve();
|
|
324
|
+
};`);
|
|
325
|
+
// Determine result window start before URL extraction
|
|
326
|
+
let startIdx = 0;
|
|
327
|
+
if (cursorUrl) {
|
|
328
|
+
// Extract URLs to locate cursor position
|
|
329
|
+
for (let i = 0; i < allPosts.length; i++) {
|
|
330
|
+
const post = allPosts[i];
|
|
331
|
+
if (!post)
|
|
332
|
+
continue;
|
|
333
|
+
if (i > 0)
|
|
334
|
+
await gaussianDelay(550, 125, 300, 800);
|
|
335
|
+
await maybeBreak();
|
|
336
|
+
const url = await retryInteraction(() => captureActivityPostUrl(client, i, mouse));
|
|
337
|
+
if (url) {
|
|
338
|
+
post.url = url;
|
|
339
|
+
if (url === cursorUrl) {
|
|
340
|
+
startIdx = i + 1;
|
|
341
|
+
break;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
// Only extract URLs for posts in the returned window
|
|
347
|
+
const windowEnd = Math.min(startIdx + count, allPosts.length);
|
|
348
|
+
for (let i = startIdx; i < windowEnd; i++) {
|
|
349
|
+
const post = allPosts[i];
|
|
350
|
+
if (!post || post.url)
|
|
351
|
+
continue;
|
|
352
|
+
if (i > startIdx)
|
|
353
|
+
await gaussianDelay(550, 125, 300, 800);
|
|
354
|
+
await maybeBreak();
|
|
355
|
+
const url = await retryInteraction(() => captureActivityPostUrl(client, i, mouse));
|
|
356
|
+
if (url) {
|
|
357
|
+
post.url = url;
|
|
358
|
+
}
|
|
165
359
|
}
|
|
166
|
-
const
|
|
167
|
-
|
|
168
|
-
|
|
360
|
+
const window = allPosts.slice(startIdx, startIdx + count);
|
|
361
|
+
const posts = mapRawPosts(window);
|
|
362
|
+
// Determine next cursor — use last post with a non-null URL
|
|
363
|
+
const hasMore = startIdx + count < allPosts.length;
|
|
364
|
+
let nextCursor = null;
|
|
365
|
+
if (hasMore) {
|
|
366
|
+
for (let i = window.length - 1; i >= 0; i--) {
|
|
367
|
+
const url = window[i]?.url;
|
|
368
|
+
if (url) {
|
|
369
|
+
nextCursor = url;
|
|
370
|
+
break;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
169
373
|
}
|
|
170
|
-
|
|
171
|
-
return {
|
|
172
|
-
profilePublicId,
|
|
173
|
-
posts: parsed.posts,
|
|
174
|
-
paging: parsed.paging,
|
|
175
|
-
};
|
|
374
|
+
await gaussianDelay(800, 300, 300, 1_800); // Post-action dwell
|
|
375
|
+
return { profilePublicId, posts, nextCursor };
|
|
176
376
|
}
|
|
177
377
|
finally {
|
|
178
378
|
client.disconnect();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-profile-activity.js","sourceRoot":"","sources":["../../src/operations/get-profile-activity.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;
|
|
1
|
+
{"version":3,"file":"get-profile-activity.js","sourceRoot":"","sources":["../../src/operations/get-profile-activity.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE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