coffeeinabit 0.0.32 → 0.0.34
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/linkedin_automation.js +1 -1
- package/package.json +1 -1
- package/tools/get_messages.js +1 -1
- package/tools/like_post.js +6 -1
package/linkedin_automation.js
CHANGED
|
@@ -382,7 +382,6 @@ export class LinkedInAutomation {
|
|
|
382
382
|
} catch (error) {
|
|
383
383
|
console.error('[LinkedInAutomation] Error saving storage state:', error.message);
|
|
384
384
|
}
|
|
385
|
-
await closeAllConversationBubbles(this.page);
|
|
386
385
|
await this.waitRandom(3000, 5000);
|
|
387
386
|
|
|
388
387
|
console.log('[LinkedInAutomation] Switching back to headless mode...');
|
|
@@ -689,6 +688,7 @@ export class LinkedInAutomation {
|
|
|
689
688
|
captureLog('warn', args);
|
|
690
689
|
originalConsoleWarn.apply(console, args);
|
|
691
690
|
};
|
|
691
|
+
await closeAllConversationBubbles(this.page);
|
|
692
692
|
|
|
693
693
|
try {
|
|
694
694
|
console.log('[LinkedInAutomation] Starting execution of action:', action.action, 'ID:', action.action_id);
|
package/package.json
CHANGED
package/tools/get_messages.js
CHANGED
|
@@ -363,7 +363,7 @@ async function extractMessageDataFallback(page) {
|
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
365
|
|
|
366
|
-
async function closeAllConversationBubbles(page) {
|
|
366
|
+
export async function closeAllConversationBubbles(page) {
|
|
367
367
|
console.log('[get_messages] Closing all conversation bubbles');
|
|
368
368
|
try {
|
|
369
369
|
const closeButtons = page.locator('button').filter({
|
package/tools/like_post.js
CHANGED
|
@@ -2,10 +2,15 @@ import { safeGoto } from './navigation.js';
|
|
|
2
2
|
import { humanLikeClick, waitRandom, randomBetween } from './human_mouse.js';
|
|
3
3
|
|
|
4
4
|
export async function executeLikePost(page, action) {
|
|
5
|
-
|
|
5
|
+
let postUrl = action.parameters?.url || action.url;
|
|
6
6
|
|
|
7
7
|
console.log('[LikePost] Starting like post action');
|
|
8
8
|
console.log('[LikePost] Post URL:', postUrl);
|
|
9
|
+
|
|
10
|
+
if (postUrl && postUrl.startsWith('urn:li:activity:')) {
|
|
11
|
+
postUrl = `https://www.linkedin.com/feed/update/${postUrl}/`;
|
|
12
|
+
console.log(`[LikePost] Converted URN to URL: ${postUrl}`);
|
|
13
|
+
}
|
|
9
14
|
|
|
10
15
|
if (!postUrl) {
|
|
11
16
|
console.error('[LikePost] Missing required parameter: url');
|