Solution 1 :

try to turn

for tile in soup.find_all('div', class_='product'):
    print(tile)

into this

for tile in soup.find_all('div', {'class':'product '}):
    print(tile)

Problem :

I’m trying to find a class tag of 'product ' (including the space at the end), it doesn’t return anything using this code:
xxx – I cannot discuss what i am doing with detail (NDA)

import requests
from bs4 import BeautifulSoup
page = 'xxx'
source = requests.get(page).text
soup = BeautifulSoup(source, 'lxml')

for tile in soup.find_all('div', class_='product'):
    print(tile)

There are multiple instances of this class repeated for each product on the site and i want to loop to them individually.

Comments

Comment posted by Anwarvic

Then, you need to pass

By

Leave a Reply

Your email address will not be published. Required fields are marked *