Esempio n. 1
0
 def __init__(self, url, *args, **kwargs):
     self.url = url
     self.response = scrape(self.url, **kwargs)
     self.soup = BeautifulSoup(self.response, 'lxml')
     self.result = [
         SmartPriceSeller(self.get_product_attrs(item))
         for item in self.products_html
     ]
Esempio n. 2
0
 def __init__(self, url, *args, **kwargs):
     self.url = url
     self.response = scrape(self.url, **kwargs)
     self.soup = BeautifulSoup(self.response, 'lxml')
     self.result = [
         SmartPriceSeller(self.get_product_attrs(item))
         for item in self.products_html
         ]
Esempio n. 3
0
 def __init__(self, mapper, **kwargs):
     self.mapper = mapper
     self.params = kwargs
     self.url = constants.URL_MAPPER[self.mapper]
     self.response = scrape(self._make_url(self.url), **kwargs)
     self.soup = BeautifulSoup(self.response, 'lxml')
     self.result = [
         SmartPriceResult(self.get_product_attrs(item))
         for item in self.products_html
     ]
Esempio n. 4
0
 def __init__(self, mapper, **kwargs):
     self.mapper = mapper
     self.params = kwargs
     self.url = constants.URL_MAPPER[self.mapper]
     self.response = scrape(self._make_url(self.url), **kwargs)
     self.soup = BeautifulSoup(self.response, 'lxml')
     self.result = [
         SmartPriceResult(self.get_product_attrs(item))
         for item in self.products_html
         ]