Skip to content

Commit 106a7a1

Browse files
committed
Fix: formatting errors
1 parent 3ce454f commit 106a7a1

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

web-scraping-bs4/job_search.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def filter_jobs_by_keyword(results, word):
3434
:rtype: None
3535
"""
3636
filtered_jobs = results.find_all('h2',
37-
string=lambda text: word in text.lower())
37+
string=lambda text: word in text.lower())
3838
for f_job in filtered_jobs:
3939
link = f_job.find('a')['href']
4040
print(f_job.text.strip())

web-scraping-bs4/scrape_jobs.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@
1010
results = soup.find(id='ResultsContainer')
1111

1212
# Look for Python jobs
13-
python_jobs = results.find_all(
14-
'h2',
15-
string=lambda text: "python" in text.lower()
16-
)
13+
python_jobs = results.find_all('h2',
14+
string=lambda t: "python" in t.lower())
1715
for p_job in python_jobs:
1816
link = p_job.find('a')['href']
1917
print(p_job.text.strip())

0 commit comments

Comments
 (0)