File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ import requests
2+ from bs4 import BeautifulSoup
3+
4+
5+ URL = 'https://www.monster.com/jobs/search/?q=Software-Developer&where=Australia'
6+ page = requests .get (URL )
7+
8+ soup = BeautifulSoup (page .content , 'html.parser' )
9+ results = soup .find (id = 'ResultsContainer' )
10+
11+ # Look for Python jobs
12+ python_jobs = results .find_all ('h2' , string = lambda text : "python" in text .lower ())
13+ for p_job in python_jobs :
14+ link = p_job .find ('a' )['href' ]
15+ print (p_job .text .strip ())
16+ print (f"Apply here: { link } \n " )
17+
18+ # Print out all available jobs from the scraped webpage
19+ job_elems = results .find_all ('section' , class_ = 'card-content' )
20+ for job_elem in job_elems :
21+ title_elem = job_elem .find ('h2' , class_ = 'title' )
22+ company_elem = job_elem .find ('div' , class_ = 'company' )
23+ location_elem = job_elem .find ('div' , class_ = 'location' )
24+ if None in (title_elem , company_elem , location_elem ):
25+ continue
26+ print (title_elem .text .strip ())
27+ print (company_elem .text .strip ())
28+ print (location_elem .text .strip ())
29+ print ()
You can’t perform that action at this time.
0 commit comments