I got the following code:
from bs4 import BeautifulSoup
import requests
import re
source = requests.get('https://tienda.mimo.com.ar/mimo/junior/ropa-para-ninas.html').text
soup = BeautifulSoup(source, 'lxml')
for name_product, old_price, special_price in zip(soup.select('h3', class_='titprod'),
soup.select('span[id^="old-price"]'),
soup.select('span[id^="product-price"]')):
print(f'Name: {name_product.text.strip()} | Old price = {old_price.text.strip()} | Discounted price = {special_price.text.strip()}')
that outputs:
Name: Para acceder a la promoción seleccione el banco y la tarjeta de crédito que corresponda | Old price = $ 295 | Discounted price = $ 236
Name: ¡Gracias por suscribirte al newsletter! | Old price = $ 990 | Discounted price = $ 743
Name: Elegí por talle | Old price = $ 2.300 | Discounted price = $ 1.725
Name: TAPABOCAS | Old price = $ 1.550 | Discounted price = $ 1.163
Name: REMERA JR TOWN | Old price = $ 2.990 | Discounted price = $ 2.243
Name: CAMISOLA NENA DELFI | Old price = $ 1.990 | Discounted price = $ 1.493
As you can see instead of taking the proper Product's names. Its actually taking what it says on the header on the very first two lines (Name: Para acceder a la promoción seleccione el banco y la tarjeta de crédito que corresponda...... ) , which are using the same css_selector (titprod). Don't know how to get deep into the LI class (rounded black square) to get to the proper name of the product (rounded red square). Due to this the list is misplaced, causing the prices to not correspond to the name of the product on each line.
