# import requests
# from bs4 import BeautifulSoup

# url = "https://www.n11.com/bilgisayar/dizustu-bilgisayar"

# html=requests.get(url).content
# laptop= BeautifulSoup(html ,"html.parsers")

# liste= laptop.find_all("li",{"class":"column"})


# for li in liste:
#     bilgi= li.find("div",{"class":"productName "}).find("h3").text
#     fiyat= li.find("div",{"class":"proDetail"}).find("del").text

#     print(f"ürün açıklaması {bilgi} olan ürünün fiyatı {fiyat} ")
#     sayi+=1





import requests
from bs4 import BeautifulSoup

url = "https://www.n11.com/bilgisayar/dizustu-bilgisayar"

html = requests.get(url).content
soup = BeautifulSoup(html, "html.parser")

list = soup.find_all("li",{"class":"column"})

for li in list:
    name = li.div.a.h3.text.strip()
    link = li.div.a.get("href")
    oldprice = li.find("div",{"class":"proDetail"}).find_all("a")[0].text.strip().strip('TL')
    newprice = li.find("div",{"class":"proDetail"}).find_all("a")[1].text.strip().strip('TL')

    print(f"name: {name} link: {link} old price: {oldprice} new price: {newprice}")


