def normalise(self, data, uri, view_date): ans = super().normalise(data, uri, view_date) salary_raw = data["baseSalary"]["value"].get("value") salary = get_salary_data(salary_raw) location_raw = location_jsonld(data) return { **ans, **salary, "location_raw": location_raw, **AU_GEOCODER.geocode(location_raw), }
def normalise(self, *args, **data) -> Dict[str, Any]: return { "title": data["job_title"], "description": data["job_description"], "uri": data["page_url"], # Not quite true; this is date added "view_date": datetime.datetime.strptime(data["date_added"], "%d/%m/%Y"), **get_salary_data(data["salary"]), "location_raw": data["location"], **AU_GEOCODER.geocode(data["location"]), }
def normalise(self, title, description, metadata, uri, view_date): salary = get_salary_data(metadata.get("Total Remuneration Package:") or "") location_raw = metadata["Job Location:"] return { "title": title, "description": html2plain(description), "uri": uri, "view_date": datetime_from_iso_utc(view_date), "org": metadata["Organisation/Entity:"], **salary, "location_raw": location_raw, **AU_GEOCODER.geocode(fixup_iworkfornsw_loc(location_raw)), }
def normalise(self, title, description, metadata, uri, view_date): salary_data = get_salary_data( metadata.get("Salary:") or metadata["Salary Range:"]) location_raw = metadata.get("Location:") or metadata["Work location:"] return { "title": title, "description": html2plain(description), "uri": uri, "view_date": datetime_from_iso_utc(view_date), "org": metadata.get("Organisation:"), **salary_data, "location_raw": location_raw, **AU_GEOCODER.geocode(fixup_careers_vic_location(location_raw)), }
def normalise(self, data, uri, view_date): metadata = {row["value"]: row["name"] for row in data["mainAttributes"]} salary_raw = metadata.get("Salary Detail") salary_data = get_salary_data(salary_raw) return { "title": data["title"], "description": html2plain(data["description"]), "uri": uri, "view_date": datetime_from_iso_utc(view_date), "org": None, **salary_data, "location_raw": data["mapAddress"], **AU_GEOCODER.geocode(data["mapAddress"]), }
def normalise( self, title, description, organisation_description, metadata, uri, view_date ): salary_text = metadata.get("Salary :") salary_data = get_salary_data(salary_text) location_raw = metadata["Location :"] return { "title": title, "description": html2plain(description), "uri": uri, "view_date": datetime_from_iso_utc(view_date), "org": metadata.get("Organisation :"), **salary_data, "location_raw": location_raw, **AU_GEOCODER.geocode(fix_probono_location(location_raw)), }
def normalise(self, data, uri, view_date): salary_text = data["salary"] location = data["locationHierarchy"] location_text = ", ".join([ location["suburb"], location["city"], location["state"], location["nation"], ]) return { "title": data["title"], "description": html2plain(data["mobileAdTemplate"]), "uri": uri, "view_date": datetime_from_iso_utc(view_date), "org": data["advertiser"]["description"], **get_salary_data(salary_text), "location_raw": location_text, **AU_GEOCODER.geocode(location_text), }
def normalise(self, *args, **data) -> Dict[str, Any]: parts = [ x for x in [data.get("city"), data.get("state"), data.get("geo")] if x ] location_text = ", ".join(parts) return { "title": data["job_title"], "description": data["job_description"], "uri": data["pageurl"], "view_date": datetime.datetime.strptime(data["crawl_timestamp"], "%Y-%m-%d %H:%M:%S +0000"), "org": data["company_name"], **get_salary_data(data.get("salary_offered")), "location_raw": location_text, **AU_GEOCODER.geocode(location_text), }
def normalise(self, *args, **data) -> Dict[str, Any]: location_text = ", ".join([ data["city"], data["state"], data.get("country") or data["inferred_country"], ]) salary_text = data.get("salary_offered") return { "title": data["job_title"], "description": data["job_description"], "uri": data["url"], "view_date": datetime.datetime.strptime(data["crawl_timestamp"], "%Y-%m-%d %H:%M:%S +0000"), "org": data["company_name"], **get_salary_data(salary_text), "location_raw": location_text, **AU_GEOCODER.geocode(location_text), }