def glassdoor_jobs(url):
    req = requests.get(url, headers={"User-agent": "job_bot 1.0"})
    soup = BeautifulSoup(req.content, "html.parser")
    tags = soup.findAll("li", class_="jl react-job-listing gdGrid")
    print(len(tags))
    for tag in tags:
        listing = Listing()
        title = tag.find(
            "a", class_="jobInfoItem jobTitle css-13w0lq6 eigr9kq1 jobLink"
        ).span.text
        listing.title = title[:35] + "..." if len(title) > 40 else title
        listing.company = tag.find(
            "div",
            class_="jobHeader d-flex justify-content-between align-items-start"
        ).a.span.text
        salary = tag.find("div", class_="salaryEstimate ")
        listing.salary = salary.span.span.text if salary is not None else "Not Listed"
        location = tag.find("div",
                            class_="d-flex flex-wrap css-yytu5e e1rrn5ka1")
        listing.location = location.span.text if location is not None else "US"
        listing.date = "24hr"
        listing.link = "https://www.glassdoor.com" + tag.find(
            "a", class_="jobLink").get("href")
        listing.logo = "https://www.adweek.com/agencyspy/wp-content/uploads/sites/7/2016/01/glassdoor.jpg"
        exists = False
        for job in jobs:
            if listing == job:
                exists = True
                break
        if not exists:
            jobs.append(listing.to_dict())
def indeed_jobs(url):
    req = requests.get(url, headers={"User-agent": "job_bot 1.0"})
    soup = BeautifulSoup(req.content, "html.parser")
    tags = soup.findAll("div", class_="jobsearch-SerpJobCard")
    for tag in tags:
        title = tag.find("h2", class_="title").a.get("title").strip()
        if listing_filter(title):
            listing = Listing()
            listing.title = title[:35] + "..." if len(
                title) > 40 else title  # 75 and 80
            listing.company = tag.find("div",
                                       class_="sjcl").div.span.text.lstrip()
            salary = tag.find("span", class_="salaryText")
            listing.salary = salary.text.lstrip(
            ) if salary is not None else "Not Listed"
            listing.location = tag.find("div", class_="recJobLoc")[
                "data-rc-loc"]  # same as .get("data-rc-loc")
            listing.date = (date.today() -
                            timedelta(days=1)).strftime('%y-%m-%d')
            listing.link = f"https://www.google.com/search?q={title}+{listing.company}+{listing.location}+{listing.date}+job+opening"
            listing.logo = "https://is2-ssl.mzstatic.com/image/thumb/Purple118/v4/ab/03/b8/ab03b82b-12cf-ce7c-249f-b54a8f01c1b9/AppIcon-1x_U007emarketing-85-220-0-6.png/246x0w.jpg"
            exists = False
            for job in jobs:
                if listing == job:
                    exists = True
                    break
            if not exists:
                jobs.append(listing.to_dict())
Beispiel #3
0
def linkedin_jobs(url):
    req = requests.get(url, headers={"User-agent": "job_bot 1.0"})
    soup = BeautifulSoup(req.content, "html.parser")
    tags = soup.html.body.findAll("div", class_="result-card__contents job-result-card__contents")
    # print(len(tags))
    for tag in tags:
        listing = Listing()
        listing.title = tag.h3.text[:35] + "..." if len(tag.h3.text) > 40 else tag.h3.text
        listing.company = tag.h4.a.text
        listing.location = tag.div.span.text
        listing.date = tag.time.text
        listing.link = tag.h4.a.get("href")
        listing.logo = "https://cdn4.iconfinder.com/data/icons/flat-icon-social-media/256/Linkedin.png"
        jobs.append(listing.to_dict())
Beispiel #4
0
def monster_jobs(url):
    req = requests.get(url, headers={"User-agent": "job_bot 1.0"})
    soup = BeautifulSoup(req.content, "html.parser")
    tags = soup.findAll("div", class_="flex-row")
    for tag in tags:
        title = tag.find("h2", class_="title").a.text[:-2]
        if listing_filter(title):
            listing = Listing()
            listing.title = title[:35] + "..." if len(title) > 40 else title
            listing.company = tag.find("div", class_="company").span.text
            listing.location = tag.find("div", class_="location").span.text[2:-2]
            listing.date = tag.find("div", class_="meta flex-col").time.get("datetime")[:-6]
            listing.link = tag.find("h2", class_="title").a.get("href")
            listing.logo = "https://games.lol/wp-content/uploads/2018/10/monster-search-best-pc-download-online.png"
            exists = False
            for job in jobs:
                if listing == job:
                    exists = True
                    break
            if not exists:
                jobs.append(listing.to_dict())