woob.capabilities.pricecomparison

class Shop(id='', url=NotLoaded, backend=None)[source]

Bases: BaseObject

A shop where the price is.

Variables:
  • url – (str) url

  • name – (str) Name of shop

  • location – (str) Location of the shop

  • info – (str) Information about the shop

class Price(id='', url=NotLoaded, backend=None)[source]

Bases: BaseObject

Price.

Variables:
  • url – (str) url

  • date – (date, datetime) Date when this price has been published

  • cost – (Decimal) Cost of the product in this shop

  • currency – (str) Currency of the price

  • message – (str) Message related to this price

  • shop – (Shop) Shop information

  • product – (Product) Product

class Product(id='', url=NotLoaded, backend=None)[source]

Bases: BaseObject

A product.

Variables:
  • url – (str) url

  • name – (str) Name of product

class CapPriceComparison[source]

Bases: Capability

Capability for price comparison websites.

search_products(pattern=None)[source]

Search products from a pattern.

Parameters:

pattern (str) – pattern to search (default: None)

Return type:

iter[Product]

iter_prices(products)[source]

Iter prices for a product.

Parameters:

product (Product) – product to search

Return type:

iter[Price]

get_price(id)[source]

Get a price from an ID

Parameters:

id (str) – ID of price

Return type:

Price