diff --git a/sites/veoneer.py b/sites/veoneer.py index 62cf1dc..2ec1fcb 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,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"),