Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions no_Jobs/sonnentor.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
from scraper.Scraper import Scraper
from utils import publish_or_update, publish_logo, create_job, show_jobs
import time

company = "SonnentoR"
jobs = []

url = "https://www.sonnentor.ro/despre-noi/cariere.html"

headers = {
"User-Agent": (
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) "
"AppleWebKit/537.36 (KHTML, like Gecko) "
"Chrome/121.0.0.0 Safari/537.36"
),
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
"Accept-Language": "ro-RO,ro;q=0.9,en-US;q=0.8,en;q=0.7",
"Accept-Encoding": "gzip, deflate, br",
"Connection": "keep-alive",
"Referer": "https://www.sonnentor.ro/",
}

scraper = Scraper()
scraper.set_headers(headers)

# Delay anti-bot
time.sleep(2)

scraper.get_from_url(url)

jobs_elements = scraper.find_all(
"section",
class_="img-text-teaser__body img-text-teaser__body--papercut js-go-to-link img-text-teaser__body--papercut-right img-text-teaser__body--red"
)

print(f"Found {len(jobs_elements)} jobs")

for job in jobs_elements:
a = job.find("a")
if not a:
continue

jobs.append(
create_job(
company=company,
job_title=a.text.strip(),
job_link=a["href"],
city="Reghin",
county="Mures",
country="Romania",
)
)

# publish_or_update(jobs)
# publish_logo(
# company,
# "https://www.sonnentor.ro/pub/static/version1690913752/frontend/sonnentor/ultimate/ro_RO/images/logo.png",
# )
# show_jobs(jobs)
44 changes: 22 additions & 22 deletions sites/goodyear.py
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
from scraper.Scraper import Scraper
from utils import publish_or_update, publish_logo, create_job, show_jobs, translate_city
from math import ceil
from getCounty import GetCounty
import json

_counties = GetCounty()
company = "GoodYear"
url = "https://jobs.goodyear.com/search/?createNewAlert=false&q=&locationsearch=Romania"
url = " https://goodyear.wd1.myworkdayjobs.com/wday/cxs/goodyear/GoodyearCareers/jobs"

scraper = Scraper()
scraper.get_from_url(url)
post_data = {"appliedFacets": {"locations": ["013bdadd1adf100168e66388c7390000",
"8e6033e1c034100168b80fcc8d420000"]}, "limit": 20, "offset": 0, "searchText": ""}

totalJobs = int(
scraper.find("span", class_="paginationLabel").find_all("b")[-1].text.strip()
)
headers = {"Content-Type": "application/json"}
scraper = Scraper()
scraper.set_headers(headers)
obj = scraper.post(url, json.dumps(post_data))

pages = ceil(totalJobs / 25)
step = 20
total_jobs = obj.json()["total"]
pages = ceil(total_jobs / step)

jobs = []

for page in range(1, pages + 1):
for pages in range(0, pages):
if pages > 1:
post_data["offset"] = pages * step
obj = scraper.post(url, json.dumps(post_data))

jobs_elements = (
scraper.find("table", id="searchresults").find("tbody").find_all("tr")
)

for job in jobs_elements:
job_link = "https://jobs.goodyear.com" + job.find("a")["href"]
job_title = job.find("a").text.strip()
job_location = translate_city(job.find("span", class_="jobLocation").text.split(",")[0].title().strip())
for job in obj.json()["jobPostings"]:
job_title = job["title"]
job_link = "https://goodyear.wd1.myworkdayjobs.com/en-US/GoodyearCareers" + \
job["externalPath"]
country = "Romania"
remote = [job.get("remoteType") if job.get("remoteType") else []]

jobs.append(
create_job(
job_title=job_title,
job_link=job_link,
city=job_location,
county = _counties.get_county(job_location),
country="Romania",
company=company,
remote=remote,
)
)

scraper.get_from_url(url + f"&startrow={page * 25}")


publish_or_update(jobs)

Expand Down
31 changes: 0 additions & 31 deletions sites/sonnentor.py

This file was deleted.

Loading