Refat81 commited on
Commit
ffc0355
Β·
verified Β·
1 Parent(s): f121736

Update pages/linkedin_extractor.py

Browse files
Files changed (1) hide show
  1. pages/linkedin_extractor.py +20 -18
pages/linkedin_extractor.py CHANGED
@@ -102,24 +102,26 @@ This appears to be a professional developer/engineer who:
102
  - Works on projects like University Information systems and LinkedIn data analysis"""
103
 
104
  else:
105
- # FIXED: Properly formatted string without syntax errors
106
- response_text = f"""**πŸ€– Analysis Response:**
107
-
108
- I've analyzed this LinkedIn post for you.
109
-
110
- **Your question:** "{user_input}"
111
-
112
- **Post Content:** {content_blocks[0][:200] + '...' if content_blocks else 'No content'}
113
-
114
- This appears to be a post where the author is sharing their GitHub profile and showcasing technical projects they've built.
115
-
116
- **Try asking:**
117
- - "What projects are mentioned?"
118
- - "Tell me about the GitHub profile"
119
- - "What is the main purpose of this post?"
120
- - "What skills does the author have?""""
121
-
122
- return response_text
 
 
123
 
124
  except Exception as e:
125
  return f"❌ Analysis error: {str(e)}"
 
102
  - Works on projects like University Information systems and LinkedIn data analysis"""
103
 
104
  else:
105
+ # FIXED: Using regular string with line breaks instead of triple quotes
106
+ post_preview = content_blocks[0][:200] + '...' if content_blocks else 'No content'
107
+ response_lines = [
108
+ "**πŸ€– Analysis Response:**",
109
+ "",
110
+ f"I've analyzed this LinkedIn post for you.",
111
+ "",
112
+ f"**Your question:** \"{user_input}\"",
113
+ "",
114
+ f"**Post Content:** {post_preview}",
115
+ "",
116
+ "This appears to be a post where the author is sharing their GitHub profile and showcasing technical projects they've built.",
117
+ "",
118
+ "**Try asking:**",
119
+ "- \"What projects are mentioned?\"",
120
+ "- \"Tell me about the GitHub profile\"",
121
+ "- \"What is the main purpose of this post?\"",
122
+ "- \"What skills does the author have?\""
123
+ ]
124
+ return "\n".join(response_lines)
125
 
126
  except Exception as e:
127
  return f"❌ Analysis error: {str(e)}"