Spaces:
Sleeping
Sleeping
File size: 4,800 Bytes
5a1c96e 7b36e20 5a1c96e 3ce60d5 261b9b6 3ce60d5 261b9b6 3a477b5 4364f4a 1e807fb 08dbcfc f2d0d7c 9bba861 7fe9122 5a1c96e 1e807fb 5a1c96e 868b712 1e807fb 868b712 9bba861 868b712 1d685c9 9bba861 f2d0d7c 5a1c96e 29fc20d 5a1c96e baa7c1b 5a1c96e 29fc20d 5a1c96e f2d0d7c 5a1c96e 29fc20d 5a1c96e f2d0d7c |
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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
import streamlit as st
import requests
import numpy as np
from PIL import Image
import warnings
warnings.filterwarnings("ignore")
import requests
import pandas as pd
import numpy as np
from bs4 import BeautifulSoup
import bs4
from urllib.request import urlopen
import time
import re
import time
import matplotlib.pyplot as plt
import seaborn as sns
import matplotlib as mpl
import plotly
import plotly.express as px
import plotly.graph_objs as go
import plotly.offline as py
from plotly.offline import iplot
from plotly.subplots import make_subplots
import plotly.figure_factory as ff
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.chrome.service import Service
import requests
import platform
import zipfile
import os
import subprocess
import os
import subprocess
'''# Make sure the chromedriver is executable
os.chmod('chromedriver', 0o755)
# Set up Chrome options
options = webdriver.ChromeOptions()
options.add_argument('--headless')
options.add_argument('--no-sandbox')
options.add_argument('--disable-dev-shm-usage')
from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_argument('--headless')
driver = webdriver.Chrome(options=options)
print("'''''",driver.capabilities['browserVersion'],"''''")
driver.quit()
# Initialize the ChromeDriver
service = Service('chromedriver')
driver = webdriver.Chrome(service=service, options=options)'''
from wuzzuf_scraper import Wuzzuf_scrapping
from linkedin_scraper import LINKEDIN_Scrapping
from data_analysis import map_bubble,linkedin_exp,wuzzuf_exp
####################### stream lit app ################################
st.set_page_config(page_title="My Web_Scrap Page", page_icon=":tada:", layout="wide")
# ---- HEADER SECTION ----
with st.container():
left_column, right_column = st.columns(2)
with left_column:
st.subheader("Hi! I am Yassmen :wave:")
st.title("An Electronics and Communcation Engineer")
st.write(
"In this app we will scrap jobs from LinkedIn and Wuzzuf websites, let's get it started :boom:"
)
st.write("[Reach me >](https://www.linkedin.com/in/yassmen-youssef-48439a166/)")
with right_column:
st.image("images.jfif", use_column_width=True)
# st_lottie(lottie_coding, height=300, key="coding")
import streamlit as st
from streamlit_option_menu import option_menu
#with st.sidebar:
# selected = option_menu("Main Menu", ["select website", 'search job','numbers of jobs'], icons=['linkedin', 'search','123'], menu_icon="cast", default_index=1)
webs =["Wuzzuf","Linkedin"]
jobs =["Machine Learning","AI Engineer","Data Analysis","Software Testing"]
nums = np.arange(1,1000)
#with st.sidebar:
#if selected == "select website":
site = st.sidebar.selectbox("select one website", webs)
#elif selected == "search job":
job = st.sidebar.selectbox("select one job", jobs)
#elif selected == "numbers of jobs":
num_jobs = st.sidebar.selectbox("select num of jobs you want to scrap", nums)
import streamlit.components.v1 as components
import hydralit_components as hc
n2 = pd.DataFrame()
if st.sidebar.button('Start Scrapping'):
if site =="Wuzzuf":
with st.container():
st.write("---")
tab1, tab2 ,tab3= st.tabs([" Data", " Bubble Map","Data Exploration"])
with tab1 :
with st.spinner('✨Now loading...' ):
time.sleep(5)
n1 = Wuzzuf_scrapping(job ,num_jobs )
try:
tab1.dataframe(n1)
except:
try:
tab1.write(n1.astype(str).set_index(n1.index.astype(str))) # Success
except:
tab1.table(n1)
with tab2:
map_bubble(n1)
with tab3:
#tab3.plotly_chart(wuzzuf_exp(n1))
wuzzuf_exp(n1)
if site =="Linkedin":
with st.container():
st.write("---")
'''
if site =="Linkedin":
with st.container():
st.write("---")
tab1, tab2 ,tab3= st.tabs([" Data", " Bubble Map","Data Exploration"])
with tab1 :
with st.spinner('✨Now loading...' ):
time.sleep(5)
n1 = LINKEDIN_Scrapping(job ,num_jobs )
try:
tab1.dataframe(n1)
except:
try:
tab1.write(n1.astype(str).set_index(n1.index.astype(str))) # Success
except:
tab1.table(n1)
with tab2:
map_bubble(n1)
with tab3:
linkedin_exp(n1) # WILL CHANGE''' |