Skip to content
Merged
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
12 changes: 5 additions & 7 deletions sites/veoneer.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from scraper.Scraper import Scraper
from utils import (
translate_city,
acurate_city_and_county,
publish_or_update,
publish_logo,
show_jobs,
Expand All @@ -17,14 +16,14 @@
scraper = Scraper()
scraper.get_from_url(url)

jobs = scraper.find("div", {"class": "mx-auto text-lg block-max-w--lg"}).find_all(
"li", {"class": "w-full"}
jobs = scraper.find("ul", {"id": "jobs_list_container"}).find_all(
"li"
)

for job in jobs:
job_title = job.find("span", {"class": "company-link-style"}).text.strip()
job_title = job.find("a").text.strip()
job_link = job.find("a").get("href")
acurate_city = acurate_city_and_county(Iasi={"city": "Iasi", "county": "Iasi"})

cities = [
translate_city(remove_diacritics(city.strip()))
for city in job.find("div", {"class": "mt-1 text-md"})
Expand All @@ -34,14 +33,13 @@
counties = []

for city in cities:
county = acurate_city.get(city) or _counties.get_county(city) or []
county = _counties.get_county(city) or []
counties.extend(county)

finalJobs.append(
{
"job_title": job_title,
"job_link": job_link,
"country": "Romania",
"city": cities,
"county": counties,
"company": company.get("company"),
Expand Down