Refat81 commited on
Commit
f9852cd
Β·
verified Β·
1 Parent(s): f5e5dde

Update pages/linkedin_extractor.py

Browse files
Files changed (1) hide show
  1. pages/linkedin_extractor.py +42 -8
pages/linkedin_extractor.py CHANGED
@@ -8,16 +8,50 @@ import os
8
  # Add to TOP of each extractor file
9
  import streamlit as st
10
 
11
- # Authentication check
12
- if "session" not in st.session_state:
13
- st.error("πŸ” Please login first!")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  st.stop()
15
 
16
- # Simple session check (add proper session verification if needed)
17
- st.session_state.authenticated = True # Keep session alive
18
-
19
- # Your existing code continues below...
20
-
21
  st.set_page_config(
22
  page_title="LinkedIn AI Analyzer",
23
  page_icon="πŸ’Ό",
 
8
  # Add to TOP of each extractor file
9
  import streamlit as st
10
 
11
+ # ============================================
12
+ # AUTHENTICATION CHECK
13
+ # ============================================
14
+ if "authenticated" not in st.session_state or not st.session_state.authenticated:
15
+ st.set_page_config(page_title="Access Denied", page_icon="πŸ”’", layout="centered")
16
+
17
+ st.markdown("""
18
+ <style>
19
+ .error-container {
20
+ text-align: center;
21
+ padding: 3rem;
22
+ background: linear-gradient(135deg, #ef4444, #dc2626);
23
+ color: white;
24
+ border-radius: 10px;
25
+ margin: 2rem 0;
26
+ }
27
+ </style>
28
+
29
+ <div class="error-container">
30
+ <h1>πŸ” Access Denied</h1>
31
+ <p style="font-size: 1.2rem;">Please login to access this page</p>
32
+ </div>
33
+ """, unsafe_allow_html=True)
34
+
35
+ st.markdown("""
36
+ <div style="text-align: center; margin-top: 2rem;">
37
+ <a href="/">
38
+ <button style="
39
+ background-color: #4285F4;
40
+ color: white;
41
+ padding: 12px 24px;
42
+ border-radius: 6px;
43
+ border: none;
44
+ font-size: 16px;
45
+ cursor: pointer;
46
+ ">
47
+ πŸ” Go to Login Page
48
+ </button>
49
+ </a>
50
+ </div>
51
+ """, unsafe_allow_html=True)
52
+
53
  st.stop()
54
 
 
 
 
 
 
55
  st.set_page_config(
56
  page_title="LinkedIn AI Analyzer",
57
  page_icon="πŸ’Ό",