Skip to content
Advertisement

printing same name, price,and link in BeautifulSoup python

How to Get all Product detail it prints the same things but I want others products to detail also here is the link from where I want to fetch the data of all product:https://www.nike.com/gb/w/womens-lifestyle-shoes-13jrmz5e1x6zy7ok

JavaScript

Advertisement

Answer

What happens?

  1. Their is a wrong indent with your print
  2. Their is only one element with class of product-grid

How to fix?

  1. Check the indent of your print, it should be in the loop to print the items.

  2. Change your selection to:

    JavaScript
  3. Bonus: Instead findAll() better use the new syntax find_all()

Example

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement