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 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, title, vendor, image_urls, link, published_at, created_at, variants
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(f"Item ID: {item.id}, Title: {item.title}, Vendor: {item.vendor}")
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:")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fmslist
3
- Version: 0.0.4
3
+ Version: 0.0.5
4
4
  Summary: A web scraper that lists items from Findmestore.
5
5
  Project-URL: Homepage, https://github.com/d4n1elchen/fmslist
6
6
  Project-URL: Issues, https://github.com/d4n1elchen/fmslist/issues
@@ -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,,
@@ -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,,