First of all, install the package using:
pip install mercapy
By initializing the mercadona class, you can search products, recommendations, and new arrivals:
from mercapy import Mercadona
mercadona = Mercadona()
mercadona.search("galletas")
mercadona.get_new_arrivals()
mercadona.get_home_recommendations()
Each product has statistics such as:
from mercapy import Product
# Find product by ID
prod = Product("12345")
prod.name # Beer
prod.unit_price # 1.25€
prod.previos_price # 1.95€
prod.is_discounted # True
prod.bulk_price # 7.5€
prod.is_pack # True
prod.weight # 0.5kg
prod.age_check # True
prod.alcohol_by_volume # 3.2%
prod.iva # 21%
You can also interact with product photos:
from mercapy import Product
# Find product by ID
prod = Product("12345")
prod.images[0].save("product.png", width=1920, height=1080)
More docs coming soon...
- 📷📱 pygramcore - A simple-to-use Instagram interface for Python using Selenium.
- 🧑💼My Portfolio - Check out my front-end and SEO skills on my Portfolio!