示例#1
0
 def iter_products(self, criteria):
     product = Product(1)
     # TODO check if criteria exists in main page
     # and get the GET keyword to fill request ?
     product.name = unicode('Occasion')
     product._criteria = criteria
     yield product
示例#2
0
文件: pages.py 项目: Boussadia/weboob
 def iter_products(self, criteria):
     product = Product(1)
     # TODO check if criteria exists in main page
     # and get the GET keyword to fill request ?
     product.name = unicode('Occasion')
     product._criteria = criteria
     yield product
示例#3
0
文件: pages.py 项目: eirmag/weboob
    def iter_products(self):
        for li in self.parser.select(self.document.getroot(), 'div#choix_carbu ul li'):
            input = li.find('input')
            label = li.find('label')

            product = Product(input.attrib['value'])
            product.name = unicode(label.text.strip())

            if '&' in product.name:
                # "E10 & SP95" produces a non-supported table.
                continue

            yield product
示例#4
0
 def get_price(self, id):
     for e in self.document.getroot().cssselect('div#DescBar'):
         product = Product(1)
         product.name = unicode('Occasion')
         cost = self._extract(e, 'PriceLc')
         title = self._extract(e, 'BrandLc')
         title += ', ' + self._extract(e, 'modeleCom')
         title += ', ' + self._extract_info(e, 'Version')
         title += ', ' + self._extract_info(e, 'Ann')
         title += ', ' + get_decimal(self._extract_info(e, 'Kilom')) + 'km'
         price = new_price(id, product, cost, title)
         price.shop = self.get_shop(id)
         return price
示例#5
0
文件: pages.py 项目: Boussadia/weboob
 def get_price(self, id):
     for e in self.document.getroot().cssselect('div#DescBar'):
         product = Product(1)
         product.name = unicode('Occasion')
         cost = self._extract(e, 'PriceLc')
         title = self._extract(e, 'BrandLc')
         title += ', ' + self._extract(e, 'modeleCom')
         title += ', ' + self._extract_info(e, 'Version')
         title += ', ' + self._extract_info(e, 'Ann')
         title += ', ' + get_decimal(self._extract_info(e, 'Kilom')) + 'km'
         price = new_price(id, product, cost, title)
         price.shop = self.get_shop(id)
         return price
示例#6
0
文件: pages.py 项目: kyrre/weboob
 def get_price(self, id):
     for e in self.document.getroot().cssselect("div#DescBar"):
         product = Product(1)
         product.name = unicode("Occasion")
         cost = self._extract(e, "PriceLc")
         title = self._extract(e, "BrandLc")
         title += ", " + self._extract(e, "modeleCom")
         title += ", " + self._extract_info(e, "Version")
         title += ", " + self._extract_info(e, "Ann")
         title += ", " + get_decimal(self._extract_info(e, "Kilom")) + "km"
         price = new_price(id, product, cost, title)
         price.shop = self.get_shop(id)
         return price
示例#7
0
    def iter_products(self):
        for li in self.parser.select(self.document.getroot(), 'div#choix_carbu ul li'):
            input = li.find('input')
            label = li.find('label')

            product = Product(input.attrib['value'])
            product.name = unicode(label.text.strip())

            if '&' in product.name:
                # "E10 & SP95" produces a non-supported table.
                continue

            yield product