Exemplo n.º 1
0
 def soup(self):
     # lazily load the soup
     # otherwise we will slow down simple operations
     if not self._soup:
         url = product_url(self.asin)
         rate_limit(self.api)
         # verify=False ignores SSL errors
         r = requests.get(url, headers={'User-Agent':user_agent}, verify=False)
         r.raise_for_status()
         #self._soup = BeautifulSoup(r.text, 'html.parser')
         self._soup = BeautifulSoup(r.text, 'html5lib')
     return self._soup
Exemplo n.º 2
0
 def soup(self):
     # lazily load the soup
     # otherwise we will slow down simple operations
     if not self._soup:
         url = product_url(self.asin)
         rate_limit(self.api)
         # verify=False ignores SSL errors
         r = requests.get(url,
                          headers={'User-Agent': user_agent},
                          verify=False)
         r.raise_for_status()
         #self._soup = BeautifulSoup(r.text, 'html.parser')
         self._soup = BeautifulSoup(r.text, 'html5lib')
     return self._soup
Exemplo n.º 3
0
 def url(self):
     return product_url(self.asin)
Exemplo n.º 4
0
 def url(self):
     return product_url(self.asin)