From 834c6c2da8790df5f1f9cf8729a26da30b00c114 Mon Sep 17 00:00:00 2001 From: lalalaurentiu Date: Tue, 28 Oct 2025 17:08:05 +0200 Subject: [PATCH 1/2] Refactor job scraping logic to improve accuracy and remove unused city handling --- sites/veoneer.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sites/veoneer.py b/sites/veoneer.py index 62cf1dc..5018d4b 100644 --- a/sites/veoneer.py +++ b/sites/veoneer.py @@ -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, @@ -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"}) @@ -34,7 +33,7 @@ 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( From 1bd3fb9ce364f63ed2385fba8a8979c0cabaa594 Mon Sep 17 00:00:00 2001 From: lalalaurentiu Date: Tue, 28 Oct 2025 17:11:48 +0200 Subject: [PATCH 2/2] Remove hardcoded country field from job data structure --- sites/veoneer.py | 1 - 1 file changed, 1 deletion(-) diff --git a/sites/veoneer.py b/sites/veoneer.py index 5018d4b..2ec1fcb 100644 --- a/sites/veoneer.py +++ b/sites/veoneer.py @@ -40,7 +40,6 @@ { "job_title": job_title, "job_link": job_link, - "country": "Romania", "city": cities, "county": counties, "company": company.get("company"),