Example #1
0
 def extract_name(self):
     respons = requests.get(
         f"https://www.ceneo.pl/{self.product_id}/#tab=reviews")
     if respons.status_code == 200:
         page_dom = BeautifulSoup(respons.text, 'html.parser')
         self.product_name = get_component(page_dom,
                                           'h1.js_product-h1-link')
Example #2
0
 def extract_components(self, opinion):
     for key, value in self.selectors.items():
         setattr(self, key, get_component(opinion, *value))
     self.opinion_id = opinion["data-entry-id"]
     return self