fmslist 0.0.4__py3-none-any.whl → 0.0.5__py3-none-any.whl
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.
- fmslist/scraper.py +14 -2
- {fmslist-0.0.4.dist-info → fmslist-0.0.5.dist-info}/METADATA +1 -1
- fmslist-0.0.5.dist-info/RECORD +6 -0
- fmslist-0.0.4.dist-info/RECORD +0 -6
- {fmslist-0.0.4.dist-info → fmslist-0.0.5.dist-info}/WHEEL +0 -0
- {fmslist-0.0.4.dist-info → fmslist-0.0.5.dist-info}/licenses/LICENSE +0 -0
fmslist/scraper.py
CHANGED
@@ -29,6 +29,7 @@ class ItemDetails:
|
|
29
29
|
vendor: str
|
30
30
|
image_urls: list[str]
|
31
31
|
link: str
|
32
|
+
product_type: str
|
32
33
|
published_at: datetime
|
33
34
|
created_at: datetime
|
34
35
|
variants: list[Variant]
|
@@ -117,6 +118,7 @@ class FindMeStoreList:
|
|
117
118
|
vendor = product.get("vendor", "Unknown Vendor")
|
118
119
|
image_urls = [image["src"] for image in product.get("images", [])]
|
119
120
|
link = f"{self._base_url}/products/{product['handle']}"
|
121
|
+
product_type = product.get("product_type", "Unknown Type")
|
120
122
|
published_at = self._parse_timestamp(product["published_at"])
|
121
123
|
created_at = self._parse_timestamp(product["created_at"])
|
122
124
|
variants = [
|
@@ -131,7 +133,15 @@ class FindMeStoreList:
|
|
131
133
|
for variant in product.get("variants", [])
|
132
134
|
]
|
133
135
|
return ItemDetails(
|
134
|
-
id,
|
136
|
+
id,
|
137
|
+
title,
|
138
|
+
vendor,
|
139
|
+
image_urls,
|
140
|
+
link,
|
141
|
+
product_type,
|
142
|
+
published_at,
|
143
|
+
created_at,
|
144
|
+
variants,
|
135
145
|
)
|
136
146
|
|
137
147
|
def _fetch_products(self, page: int) -> list[ItemDetails]:
|
@@ -160,7 +170,9 @@ if __name__ == "__main__":
|
|
160
170
|
|
161
171
|
# Print item details
|
162
172
|
for item in fms.items:
|
163
|
-
print(
|
173
|
+
print(
|
174
|
+
f"Item ID: {item.id}, Title: {item.title}, Vendor: {item.vendor}, Product Type: {item.product_type}"
|
175
|
+
)
|
164
176
|
print(f"Published at: {item.published_at}, Created at: {item.created_at}")
|
165
177
|
print(f"Link: {item.link}")
|
166
178
|
print("Variants:")
|
@@ -0,0 +1,6 @@
|
|
1
|
+
fmslist/__init__.py,sha256=LvCLbFusopU82bfaLvjmc_TnJJereamdRlo0diCSOlc,23
|
2
|
+
fmslist/scraper.py,sha256=zyZ3D5VVsRK1zXPbpyF9DgbVek85UgJ_67B7vwVI7GI,6372
|
3
|
+
fmslist-0.0.5.dist-info/METADATA,sha256=fyl4PLpHQ1UpSSF9InLSUa959dEMGaXDO_0glkFZnbo,394
|
4
|
+
fmslist-0.0.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
5
|
+
fmslist-0.0.5.dist-info/licenses/LICENSE,sha256=ACwmltkrXIz5VsEQcrqljq-fat6ZXAMepjXGoe40KtE,1069
|
6
|
+
fmslist-0.0.5.dist-info/RECORD,,
|
fmslist-0.0.4.dist-info/RECORD
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
fmslist/__init__.py,sha256=LvCLbFusopU82bfaLvjmc_TnJJereamdRlo0diCSOlc,23
|
2
|
-
fmslist/scraper.py,sha256=qZkMbT19UZ5_AJuENVLOivxCEoLzleGvcqHZetNShBE,6115
|
3
|
-
fmslist-0.0.4.dist-info/METADATA,sha256=97m5oUBbwzvCnN8Fwu9eDK81pwMm9gbnS8Cv84TuV-M,394
|
4
|
-
fmslist-0.0.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
5
|
-
fmslist-0.0.4.dist-info/licenses/LICENSE,sha256=ACwmltkrXIz5VsEQcrqljq-fat6ZXAMepjXGoe40KtE,1069
|
6
|
-
fmslist-0.0.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|