amzpy 0.1.0__tar.gz → 0.1.2__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.2
2
2
  Name: amzpy
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Summary: A lightweight Amazon scraper library.
5
5
  Home-page: https://github.com/theonlyanil/amzpy
6
6
  Author: Anil Sardiwal
@@ -35,6 +35,7 @@ Dynamic: requires-python
35
35
  Dynamic: summary
36
36
 
37
37
  # AmzPy - Amazon Product Scraper
38
+ [![PyPI](https://img.shields.io/pypi/v/amzpy)](https://pypi.org/project/amzpy/)
38
39
 
39
40
  AmzPy is a lightweight Python library for scraping product information from Amazon. It provides a simple interface to fetch product details like title, price, currency, and image URL while handling anti-bot measures automatically.
40
41
 
@@ -1,4 +1,5 @@
1
1
  # AmzPy - Amazon Product Scraper
2
+ [![PyPI](https://img.shields.io/pypi/v/amzpy)](https://pypi.org/project/amzpy/)
2
3
 
3
4
  AmzPy is a lightweight Python library for scraping product information from Amazon. It provides a simple interface to fetch product details like title, price, currency, and image URL while handling anti-bot measures automatically.
4
5
 
@@ -1,6 +1,6 @@
1
1
  from bs4 import BeautifulSoup
2
2
  from typing import Dict, Optional
3
- from engine import RequestEngine
3
+ from amzpy.engine import RequestEngine
4
4
 
5
5
  def parse_product_page(html_content: str, url: str = None, engine: RequestEngine = None, max_retries: int = 0) -> Optional[Dict]:
6
6
  """
@@ -34,7 +34,7 @@ def parse_product_page(html_content: str, url: str = None, engine: RequestEngine
34
34
 
35
35
  # Get price
36
36
  price_element = soup.select_one('.a-price-whole')
37
- price = price_element.text.strip().replace(',', '') if price_element else None
37
+ price = float(price_element.text.strip().replace(',', '')) if price_element else None
38
38
 
39
39
  # Get currency symbol
40
40
  currency_element = soup.select_one('.a-price-symbol')
@@ -3,9 +3,9 @@ The main scraper module for the Amazon Product API.
3
3
  """
4
4
 
5
5
  from typing import Dict, Optional
6
- from engine import RequestEngine
7
- from parser import parse_product_page
8
- from utils import parse_amazon_url
6
+ from amzpy.engine import RequestEngine
7
+ from amzpy.parser import parse_product_page
8
+ from amzpy.utils import parse_amazon_url
9
9
 
10
10
  class AmazonScraper:
11
11
  """Main scraper class for Amazon product data"""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: amzpy
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Summary: A lightweight Amazon scraper library.
5
5
  Home-page: https://github.com/theonlyanil/amzpy
6
6
  Author: Anil Sardiwal
@@ -35,6 +35,7 @@ Dynamic: requires-python
35
35
  Dynamic: summary
36
36
 
37
37
  # AmzPy - Amazon Product Scraper
38
+ [![PyPI](https://img.shields.io/pypi/v/amzpy)](https://pypi.org/project/amzpy/)
38
39
 
39
40
  AmzPy is a lightweight Python library for scraping product information from Amazon. It provides a simple interface to fetch product details like title, price, currency, and image URL while handling anti-bot measures automatically.
40
41
 
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="amzpy",
5
- version="0.1.0",
5
+ version="0.1.2",
6
6
  description="A lightweight Amazon scraper library.",
7
7
  long_description=open("README.md").read(),
8
8
  long_description_content_type="text/markdown",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes