-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhowto-jobscrape.html
More file actions
298 lines (258 loc) · 12.9 KB
/
howto-jobscrape.html
File metadata and controls
298 lines (258 loc) · 12.9 KB
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Automated Job Search Guide</title>
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
line-height: 1.6;
color: #333;
max-width: 900px;
margin: 0 auto;
padding: 20px;
background-color: #f9f9f9;
}
h1 {
color: #2c3e50;
border-bottom: 2px solid #3498db;
padding-bottom: 10px;
}
h2 {
color: #2980b9;
margin-top: 30px;
}
h3 {
color: #16a085;
}
code {
background-color: #f0f0f0;
padding: 2px 5px;
border-radius: 3px;
font-family: 'Courier New', Courier, monospace;
}
pre {
background-color: #f0f0f0;
padding: 10px;
border-radius: 5px;
overflow-x: auto;
}
.note {
background-color: #e3f2fd;
border-left: 4px solid #2196F3;
padding: 10px 15px;
margin: 20px 0;
}
.warning {
background-color: #fff8e1;
border-left: 4px solid #ffc107;
padding: 10px 15px;
margin: 20px 0;
}
.step {
background-color: #e8f5e9;
border-left: 4px solid #4caf50;
padding: 15px;
margin: 20px 0;
border-radius: 0 5px 5px 0;
}
table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
}
th, td {
border: 1px solid #ddd;
padding: 8px;
text-align: left;
}
th {
background-color: #3498db;
color: white;
}
tr:nth-child(even) {
background-color: #f2f2f2;
}
</style>
</head>
<body>
<h1>How to Automate looking for a Job.</h1>
<div class="note">
<p>This guide documents the process that is used to make the html page at "https://zbzfirst.github.io/info/jobscrapes.html"./ This page loads a folder containing a set of files from the specified organizations. These files are the collection of job postings for the date in the filename. There are two versions provided, the "parsed" and "non-parsed" files. You can tell if it is parsed due to the inclusion of the word "parsed" in the filename. The parsed version contains columns that are specific to the jobs from each organization. This would be the area where you would find "Qualifications" or "Pay" for the job posted. A URL is included for each job posting. </p>
</div>
<h2>How the System Works</h2>
<div class="step">
<h3>1. Target Organizations</h3>
<p>This system scans job postings from two major healthcare organizations and one major academic group in California as of 4/6/2025:</p>
<ul>
<li>Kaiser Permanente</li>
<li>The Claremont Colleges</li>
<li>Dignity Health (CommonSpirit Health)</li>
</ul>
<p>These were chosen because they are among the largest healthcare employers in the state with some of the longest histories in the community (e.g. Kaiser Steel, Claremont Colleges, A Catholic Medical Institution)</p>
</div>
<div class="step">
<h3>2. Navigating to the List of Jobs and Scraping the List</h3>
<p>Upon loading the job list URL, the Python script "ScrapeOrganizationLinks.py" will automatically:</p>
<ul>
<li>Navigate to each organization's career posting page</li>
<li>Filter the job posting list by State of California if applicable</li>
<li>Extract the Job Title and URL along with any other information from each posting</li>
<li>Paginate through the job posting list until all postings are retrieved</li>
<li>Save the postings as a list in the Excel format (.xlsx)</li>
</ul>
<div class="note">
<p>The outcome from these python scripts is a collection of URL's and additional information that is publicly available from each organizations web page in an excel file. Since we are paginating through the list, we are not directly stressing the servers in any way that is different from a normal user who manages to go through the entire job posting list.</p>
</div>
</div>
<div class="step">
<h3>2. Navigating to Each Job Posting</h3>
<p>Upon loading the job url list, this Python script "ScrapeOrganizationLinks.py" will automatically:</p>
<ul>
<li>Load the excel list into Python as a Dataframe</li>
<li>Access the URL Column in the dataframe</li>
<li>Navigate to the URL for the job posting and save the html from the page into a new column in the dataframe</li>
<li>Advance through the list until all postings are retrieved</li>
<li>Save the final list as a new file affixed with the "descriptions" suffix in the filename to specify the new file.</li>
</ul>
<div class="note">
<p>This second script will then go the URLs from the previous script and save the HTML of the page into a new column for usage in the next script. Since we are saving the HTML into a new column in the dataframe and resaving as a new file, we are minimizing unnecessary returns to the web page to recheck the listing.</p>
</div>
</div>
<div class="step">
<h3>2. Parsing the HTML Column</h3>
<p>Upon loading the HTML column from the new file at the end of step 2, this Python scripts automatically:</p>
<ul>
<li>Access the HTML Column that we created in the previous script</li>
<li>Parse the HTML from this column based on the organizations formatting for job postings, there may be multiple templates per organization.</li>
<li>Place the sorted HTML into new columns (e.g. full time or part time, low starting pay, high starting pay, job location, educational requirements, etc.) </li>
<li>Save new dataframe as a parsed excel file for usage in HTML or store in database for advanced analysis</li>
</ul>
<div class="note">
<p>This final script makes the html readable and then transforms the HTML into new columns based on class and tag information from the HTML code, as a result, this makes it possible to go through the data The data is saved with a suffic of "parsed" added to the filename to specify the files at this state of data processing. It also unlocks rapid comparisons in an organization based on certain elements like pay. Data Transofmrations with Example: Certified Regisertered Nurse Anesthesiologists have pay reported as "200,000k per year" but a Staff RN III will have wages posted in a format such as "50$/hour" format. Some choices were made to standardize everything when needed but work is needed to perfect the logic and equations. Example: Wages have a new column for hourly format. Some errors may be found, if not sure, please go to the webpage URL to verify the at the organizations webpage.</p>
</div>
</div>
<h2>How to Use the System</h2>
<div class="step">
<h3>1. Load the HTML Page</h3>
<p>Proceed to "https://zbzfirst.github.io/info/jobscrapes.html".</p>
<div class="step">
<h3>2. Select Source</h3>
<p>Select an Organization from the list to view data from and click "Load Files"</p>
</div>
<div class="step">
<h3>3. Select a File to view Results</h3>
<p>After loading the files:</p>
<ol>
<li>Select a file from the dropdown box and click "Load File"</li>
</ol>
<div class="note">
<p>The filenames start with the name or abbreviation of the organization followed by the timestamp in the MMDDYYYY format. Finally they will end with the "description" or "parsed" keyword to indicate which step in the process the file comes from. Both files are present for validation, education and research purposes. Please select the "parsed" versions.</p>
</div>
</div>
<h2>Why This Approach is Effective</h2>
<div class="step">
<h3>Time Efficiency</h3>
<p>Manually checking multiple career sites is time-consuming. This system:</p>
<ul>
<li>Checks organizations simultaneously when executed concurrently</li>
<li>Processes results in about an hour while the user attends to other tasks such as bathing, cooking, or preparing other items in the pipeline.</li>
<li>When combined with mobile devices. Reviewing Job Postings becomes a simplified process when performed with sorting Software.</li>
</ul>
</div>
<h2>Tips for Job Searching</h2>
<div class="note">
<h3>1. Check Regularly</h3>
<p>Run the script daily to catch new postings every morning or evening.</p>
</div>
<div class="note">
<h3>2. Tailor Your Search</h3>
<p>Modify the files to focus on:</p>
<ul>
<li>Specific roles you're qualified for</li>
<li>Locations you can commute to</li>
<li>Departments that match your skills</li>
</ul>
</div>
<div class="note">
<h3>3. Develop more Applications</h3>
<p>Create a new file with columns to track:</p>
<ul>
<li>When you applied</li>
<li>Application status</li>
<li>Follow-up dates</li>
<li>Interview schedules</li>
</ul>
</div>
<h2>Sample Python Code Structure</h2>
<p>Here's a simplified version of what the main script might look like but hard versions are available for each organization:</p>
<pre><code>import requests
from bs4 import BeautifulSoup
import pandas as pd
from datetime import datetime
def scrape_kaiser_jobs(location=None):
"""Scrape job postings from Kaiser Permanente"""
jobs = []
base_url = "https://jobs.kaiserpermanente.org"
search_url = f"{base_url}/search-jobs/results"
params = {
'Location': location or 'California',
'Radius': 50
}
response = requests.get(search_url, params=params)
soup = BeautifulSoup(response.text, 'html.parser')
for job in soup.select('.job-list-item'):
title = job.select_one('.job-title a').text.strip()
job_url = base_url + job.select_one('.job-title a')['href']
location = job.select_one('.job-location').text.strip()
department = job.select_one('.job-department').text.strip()
date = job.select_one('.job-date').text.strip()
jobs.append({
'Title': title,
'Organization': 'Kaiser Permanente',
'Location': location,
'Department': department,
'Posting Date': date,
'URL': job_url
})
return jobs
def save_to_excel(jobs, filename='healthcare_jobs.xlsx'):
"""Save collected jobs to Excel file"""
df = pd.DataFrame(jobs)
df['Date Collected'] = datetime.now().strftime('%Y-%m-%d %H:%M')
with pd.ExcelWriter(filename) as writer:
for org in df['Organization'].unique():
org_df = df[df['Organization'] == org]
org_df.to_excel(writer, sheet_name=org[:31], index=False)
if __name__ == '__main__':
all_jobs = []
all_jobs.extend(scrape_kaiser_jobs())
# Add calls to other organization scrapers here
save_to_excel(all_jobs)
print(f"Saved {len(all_jobs)} jobs to healthcare_jobs.xlsx")</code></pre>
<div class="warning">
<p>Note: This is a simplified example. The actual scripts need to handle pagination, error handling, and may require more complex navigation for some sites. Case specific python files are in the repository.</p>
</div>
<h2>Final Advice</h2>
<p>Remember that while this system helps you find opportunities, the application process still requires:</p>
<ul>
<li>A well-prepared resume tailored to healthcare positions</li>
<li>Thoughtful cover letters that address each job's requirements</li>
<li>Professional follow-up after applying</li>
<li>Preparation for interviews specific to healthcare roles</li>
</ul>
<p>This automated search is just the first step in a successful job search strategy but is also key for maintaining a strong sense of what is happening in the job market.</p>
<footer>
<p>Last updated: <span id="current-date"></span></p>
</footer>
<script>
// Add current date to footer
document.getElementById('current-date').textContent = new Date().toLocaleDateString('en-US', {
year: 'numeric',
month: 'long',
day: 'numeric'
});
</script>
</body>
</html>