Ejemplo n.º 1
0
 def books(self):
     locator = BookPageLocators.BOOK
     book_tags = self.soup.select(
         locator)  # this will identify a single book tag
     return [
         BookParser(e) for e in book_tags
     ]  # for all books tag this will return an object that contains elements from the book tag, like name, price, starst etc.
Ejemplo n.º 2
0
 def books(self):
     logger.debug(
         f'Finding all books in the page using `{BooksPageLocators.BOOKS}`.'
     )
     return [
         BookParser(b) for b in self.soup.select(BooksPageLocators.BOOKS)
     ]
Ejemplo n.º 3
0
 def books(self):
     logger.debug(
         f'Finding all books in page using `{AllBooksPagesLocators.BOOKS}`')
     return [
         BookParser(e)
         for e in self.soup.select(AllBooksPagesLocators.BOOKS)
     ]
Ejemplo n.º 4
0
 def books(self):
     locator = BooksPageLocators.BOOKS
     logger.debug(f'Finding all books in the page using `{locator}`.')
     books = self.soup.select(locator)
     # return books
     return [BookParser(b) for b in books]
 def books(self):
     locator = BookPageLocators.BOOK
     book_tags = self.soup.select(locator)
     return [BookParser(e) for e in book_tags]
Ejemplo n.º 6
0
 def book_product(self):
     locator = EntityLocators.BOOKS
     book_products = self.soup.select(locator)
     return [BookParser(book) for book in book_products]
Ejemplo n.º 7
0
 def books(self):
     locator = AllBooksPageLocator.BOOKS
     book_tag = self.soup.select(locator)
     return [BookParser(e) for e in book_tag]
Ejemplo n.º 8
0
 def books(self):
     logger.debug(
         f'finding all books in the page using `{BooksLocator.BOOK}`.')
     locator = BooksLocator.BOOK
     return [BookParser(b) for b in self.soup.select(locator)]
Ejemplo n.º 9
0
 def books(self):
     logger.debug("Searching all books in the page")
     items=self.soup.select(BooksPageLocators.books_page)    #BeautifulSoup object (html tag)
     items_list=[BookParser(item) for item in items]
     return items_list
Ejemplo n.º 10
0
 def books(self):
     book_elements = self.soup.select(AllBooksPageLocators.BOOKS)
     return [BookParser(book_element) for book_element in book_elements]