jonathanjordan21 commited on
Commit
1b686c4
·
verified ·
1 Parent(s): 43bcca3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -51,13 +51,16 @@ async def linkedin_post_details(post_id: str):
51
  insights = chunks[3].split("\n\n")[2]
52
  likes = insights.split(" ", 1)[0].strip()
53
  comments = insights.rsplit(" ", 2)[1].strip()
 
 
54
 
55
  return {
56
- "user": {"name": full_name, "bio": bio},
57
  "content": content,
58
  "date": date,
59
  "is_edited": edited,
60
  "insights": {"likeCount": likes, "commentCount": comments, "shareCount": None, "viewCount":None},
 
61
  }
62
 
63
 
 
51
  insights = chunks[3].split("\n\n")[2]
52
  likes = insights.split(" ", 1)[0].strip()
53
  comments = insights.rsplit(" ", 2)[1].strip()
54
+
55
+ username = url.rsplit("/",1)[-1].split("_")[0]
56
 
57
  return {
58
+ "userDetails": {"full_name": full_name, "username":username,"bio": bio},
59
  "content": content,
60
  "date": date,
61
  "is_edited": edited,
62
  "insights": {"likeCount": likes, "commentCount": comments, "shareCount": None, "viewCount":None},
63
+ "username":username
64
  }
65
 
66