blocket-api 0.4.32__tar.gz → 0.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: blocket_api
3
- Version: 0.4.32
3
+ Version: 0.5.0
4
4
  Summary: A python API wrapper for blocket.se
5
5
  Author-email: dunderrrrrr <emil.bjorkroth@gmail.com>
6
6
  Requires-Python: >=3.10
@@ -15,7 +15,7 @@ Requires-Dist: mkdocs>=1.6.1
15
15
  Requires-Dist: mkdocs-material>=9.7.1
16
16
  Requires-Dist: mkdocs-swagger-ui-tag>=0.7.2
17
17
  Requires-Dist: beautifulsoup4>=4.14.3
18
- Requires-Dist: ruff>=0.14.10
18
+ Requires-Dist: ruff>=0.15.12
19
19
  Dynamic: license-file
20
20
 
21
21
  <p align="center">
@@ -73,6 +73,8 @@ api.search_car(
73
73
  price_to=50000,
74
74
  transmissions=[CarTransmission.MANUAL],
75
75
  locations=[Location.STOCKHOLM],
76
+ horsepower_from=200,
77
+ horsepower_to=300,
76
78
  org_id=1337, # dealer or store id
77
79
  )
78
80
 
@@ -53,6 +53,8 @@ api.search_car(
53
53
  price_to=50000,
54
54
  transmissions=[CarTransmission.MANUAL],
55
55
  locations=[Location.STOCKHOLM],
56
+ horsepower_from=200,
57
+ horsepower_to=300,
56
58
  org_id=1337, # dealer or store id
57
59
  )
58
60
 
@@ -91,7 +91,7 @@ class MobilityAd:
91
91
  data["price"] = price_elem.get_text(strip=True)
92
92
 
93
93
  def _extract_description(self, grid: Tag, data: dict) -> None:
94
- for section in grid.find_all("section", class_="border-t mt-40 pt-40"):
94
+ for section in grid.find_all("section", class_="pt-40 border-t mt-40"):
95
95
  h2 = section.find("h2", class_="t3 mb-0")
96
96
  if h2 and "beskrivning" in h2.get_text(strip=True).lower():
97
97
  desc_div = section.find("div", class_="whitespace-pre-wrap")
@@ -88,6 +88,8 @@ class BlocketAPI:
88
88
  milage_to: int | None = None,
89
89
  colors: list[CarColor] = [],
90
90
  transmissions: list[CarTransmission] = [],
91
+ horsepower_from: int | None = None,
92
+ horsepower_to: int | None = None,
91
93
  org_id: int | None = None,
92
94
  ) -> dict[str, Any]:
93
95
  url = f"{SITE_URL}/mobility/search/api/search/SEARCH_ID_CAR_USED"
@@ -102,12 +104,13 @@ class BlocketAPI:
102
104
  "year_to": year_to,
103
105
  "milage_from": milage_from,
104
106
  "milage_to": milage_to,
107
+ "engine_effect_from": horsepower_from,
108
+ "engine_effect_to": horsepower_to,
105
109
  "orgId": org_id,
106
110
  }
107
111
 
108
112
  params = [QueryParam(k, v) for k, v in param_dict.items() if v is not None]
109
113
 
110
- # Multi-value params
111
114
  params.extend(QueryParam("location", loc.value) for loc in locations)
112
115
  params.extend(QueryParam("make", model.value) for model in models)
113
116
  params.extend(QueryParam("exterior_colour", color.value) for color in colors)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: blocket_api
3
- Version: 0.4.32
3
+ Version: 0.5.0
4
4
  Summary: A python API wrapper for blocket.se
5
5
  Author-email: dunderrrrrr <emil.bjorkroth@gmail.com>
6
6
  Requires-Python: >=3.10
@@ -15,7 +15,7 @@ Requires-Dist: mkdocs>=1.6.1
15
15
  Requires-Dist: mkdocs-material>=9.7.1
16
16
  Requires-Dist: mkdocs-swagger-ui-tag>=0.7.2
17
17
  Requires-Dist: beautifulsoup4>=4.14.3
18
- Requires-Dist: ruff>=0.14.10
18
+ Requires-Dist: ruff>=0.15.12
19
19
  Dynamic: license-file
20
20
 
21
21
  <p align="center">
@@ -73,6 +73,8 @@ api.search_car(
73
73
  price_to=50000,
74
74
  transmissions=[CarTransmission.MANUAL],
75
75
  locations=[Location.STOCKHOLM],
76
+ horsepower_from=200,
77
+ horsepower_to=300,
76
78
  org_id=1337, # dealer or store id
77
79
  )
78
80
 
@@ -7,4 +7,4 @@ mkdocs>=1.6.1
7
7
  mkdocs-material>=9.7.1
8
8
  mkdocs-swagger-ui-tag>=0.7.2
9
9
  beautifulsoup4>=4.14.3
10
- ruff>=0.14.10
10
+ ruff>=0.15.12
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "blocket_api"
3
- version = "0.4.32"
3
+ version = "0.5.0"
4
4
  description = "A python API wrapper for blocket.se"
5
5
  authors = [{name = "dunderrrrrr", email = "emil.bjorkroth@gmail.com"}]
6
6
  readme = "README.md"
@@ -15,7 +15,7 @@ dependencies = [
15
15
  "mkdocs-material>=9.7.1",
16
16
  "mkdocs-swagger-ui-tag>=0.7.2",
17
17
  "beautifulsoup4>=4.14.3",
18
- "ruff>=0.14.10",
18
+ "ruff>=0.15.12",
19
19
  ]
20
20
 
21
21
 
File without changes
File without changes