File size: 1,673 Bytes
28712d4
 
bf8127e
 
 
 
 
 
 
 
 
db15c82
 
bf8127e
 
db15c82
 
bf8127e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import streamlit as st

# Expanded list of Pakistani cities
cities = [
    "Karachi", "Lahore", "Islamabad", "Rawalpindi", "Peshawar", "Quetta",
    "Faisalabad", "Multan", "Sialkot", "Hyderabad", "Gujranwala", "Bahawalpur",
    "Abbottabad", "Sargodha", "Mardan", "Mirpur", "Sukkur", "Larkana",
    "Chiniot", "Sheikhupura", "Gujrat", "Jhelum", "Dera Ghazi Khan", "Nawabshah"
]

# Platforms with job search URLs
platforms = {
    "LinkedIn": "https://www.linkedin.com/jobs/search/?keywords={job}&location={city}",
    "Indeed": "https://pk.indeed.com/jobs?q={job}&l={city}",
    "National Job Portal": "https://njp.gov.pk/job_search?keywords={job}&city={city}"
}

# App Title
st.title("Job Search Portal")

# User Inputs
st.subheader("Search for Jobs in Pakistan")
selected_city = st.selectbox("Select your city:", cities)
job_keyword = st.text_input("Enter job title or keywords:")
selected_platform = st.selectbox("Choose the job platform:", list(platforms.keys()))

# Show the Search button and create the link if clicked
if st.button("Search Jobs"):
    if not job_keyword.strip():
        st.warning("Please enter a job title or keyword.")
    else:
        # Construct the URL for the selected platform
        base_url = platforms[selected_platform]
        search_url = base_url.format(job=job_keyword.replace(" ", "+"), city=selected_city)

        # Create the dynamic link for the platform
        link_text = f"See {selected_platform} Jobs in {selected_city}"
        
        # Display the dynamic link
        st.markdown(f"[{link_text}]({search_url})", unsafe_allow_html=True)
        st.success(f"Click the link above to see jobs on {selected_platform}.")