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.
- {blocket_api-0.4.32 → blocket_api-0.5.0}/PKG-INFO +4 -2
- {blocket_api-0.4.32 → blocket_api-0.5.0}/README.md +2 -0
- {blocket_api-0.4.32 → blocket_api-0.5.0}/blocket_api/ad_parser.py +1 -1
- {blocket_api-0.4.32 → blocket_api-0.5.0}/blocket_api/blocket.py +4 -1
- {blocket_api-0.4.32 → blocket_api-0.5.0}/blocket_api.egg-info/PKG-INFO +4 -2
- {blocket_api-0.4.32 → blocket_api-0.5.0}/blocket_api.egg-info/requires.txt +1 -1
- {blocket_api-0.4.32 → blocket_api-0.5.0}/pyproject.toml +2 -2
- {blocket_api-0.4.32 → blocket_api-0.5.0}/LICENSE +0 -0
- {blocket_api-0.4.32 → blocket_api-0.5.0}/blocket_api/__init__.py +0 -0
- {blocket_api-0.4.32 → blocket_api-0.5.0}/blocket_api/constants.py +0 -0
- {blocket_api-0.4.32 → blocket_api-0.5.0}/blocket_api.egg-info/SOURCES.txt +0 -0
- {blocket_api-0.4.32 → blocket_api-0.5.0}/blocket_api.egg-info/dependency_links.txt +0 -0
- {blocket_api-0.4.32 → blocket_api-0.5.0}/blocket_api.egg-info/top_level.txt +0 -0
- {blocket_api-0.4.32 → blocket_api-0.5.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: blocket_api
|
|
3
|
-
Version: 0.
|
|
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.
|
|
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
|
|
|
@@ -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
|
|
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.
|
|
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.
|
|
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
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "blocket_api"
|
|
3
|
-
version = "0.
|
|
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.
|
|
18
|
+
"ruff>=0.15.12",
|
|
19
19
|
]
|
|
20
20
|
|
|
21
21
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|