Spaces:
Running
Running
Update Linkedin_Data_API_Calls.py
Browse files
Linkedin_Data_API_Calls.py
CHANGED
@@ -318,9 +318,9 @@ def prepare_data_for_bubble(detailed_posts, all_actual_comments_data):
|
|
318 |
"media_type": post_data["media_type"],
|
319 |
"published_at": post_data["published_at"], # ISO datetime string
|
320 |
"sentiment": post_data["sentiment"], # Overall sentiment of the post based on its comments
|
321 |
-
"
|
322 |
-
"summary_text": post_data["summary"],
|
323 |
-
"
|
324 |
# Add any other fields from post_data needed for LI_post table
|
325 |
})
|
326 |
|
@@ -328,7 +328,7 @@ def prepare_data_for_bubble(detailed_posts, all_actual_comments_data):
|
|
328 |
li_post_stats.append({
|
329 |
"clickCount": post_data["clicks"],
|
330 |
"commentCount": post_data["comments_stat_count"], # From post's own stats
|
331 |
-
"
|
332 |
"impressionCount": post_data["impressions"],
|
333 |
"likeCount": post_data["likes"],
|
334 |
"shareCount": post_data["shares"],
|
|
|
318 |
"media_type": post_data["media_type"],
|
319 |
"published_at": post_data["published_at"], # ISO datetime string
|
320 |
"sentiment": post_data["sentiment"], # Overall sentiment of the post based on its comments
|
321 |
+
"text": post_data["raw_text"], # Storing the full raw text
|
322 |
+
#"summary_text": post_data["summary"],
|
323 |
+
"LI_EB_label": post_data["category"],
|
324 |
# Add any other fields from post_data needed for LI_post table
|
325 |
})
|
326 |
|
|
|
328 |
li_post_stats.append({
|
329 |
"clickCount": post_data["clicks"],
|
330 |
"commentCount": post_data["comments_stat_count"], # From post's own stats
|
331 |
+
"engagement": post_data["engagement"], # Formatted string e.g., "12.34%"
|
332 |
"impressionCount": post_data["impressions"],
|
333 |
"likeCount": post_data["likes"],
|
334 |
"shareCount": post_data["shares"],
|