pyfunda 2.4.0__tar.gz → 2.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyfunda
3
- Version: 2.4.0
3
+ Version: 2.5.0
4
4
  Summary: Python API for Funda.nl real estate listings
5
5
  Project-URL: Homepage, https://github.com/0xMH/pyfunda
6
6
  Project-URL: Repository, https://github.com/0xMH/pyfunda
@@ -771,23 +771,42 @@ class Funda:
771
771
  price = price_data.get("selling_price", [None])[0]
772
772
  if not price:
773
773
  price = price_data.get("rent_price", [None])[0] if price_data.get("rent_price") else None
774
+ price_condition = price_data.get("selling_price_condition") or price_data.get("rent_price_condition")
774
775
  else:
775
776
  price = price_data
777
+ price_condition = None
778
+
779
+ offering_types = source.get("offering_type", [])
780
+ offering_type = offering_types[0] if offering_types else None
781
+
782
+ agents = source.get("agent", [])
783
+ agent = agents[0] if agents else {}
776
784
 
777
785
  listing_data = {
778
786
  "global_id": int(hit.get("_id", 0)),
779
787
  "title": f"{address.get('street_name', '')} {address.get('house_number', '')}".strip(),
788
+ "street_name": address.get("street_name"),
789
+ "house_number": address.get("house_number"),
790
+ "house_number_suffix": address.get("house_number_suffix"),
780
791
  "city": address.get("city"),
781
792
  "postcode": address.get("postal_code"),
782
793
  "province": address.get("province"),
783
794
  "neighbourhood": address.get("neighbourhood"),
784
795
  "price": price,
796
+ "price_condition": price_condition,
785
797
  "living_area": source.get("floor_area", [None])[0] if source.get("floor_area") else None,
786
798
  "plot_area": source.get("plot_area_range", {}).get("gte"),
787
799
  "bedrooms": source.get("number_of_bedrooms"),
800
+ "rooms": source.get("number_of_rooms"),
788
801
  "energy_label": source.get("energy_label"),
789
802
  "object_type": source.get("object_type"),
803
+ "offering_type": offering_type,
790
804
  "construction_type": source.get("construction_type"),
805
+ "publish_date": source.get("publish_date"),
806
+ "detail_url": source.get("object_detail_page_relative_url"),
807
+ "broker_id": agent.get("id"),
808
+ "broker_name": agent.get("name"),
809
+ "broker_association": agent.get("association"),
791
810
  "photos": source.get("thumbnail_id", [])[:5],
792
811
  }
793
812
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "pyfunda"
7
- version = "2.4.0"
7
+ version = "2.5.0"
8
8
  description = "Python API for Funda.nl real estate listings"
9
9
  readme = "README.md"
10
10
  license = "AGPL-3.0-or-later"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes