← العودة
Blog Post
عنوان المحادثة: Product Name: كوكى وجبه كاملة 12 قطعهProduct Price: 260Product Barcode...
التاريخ: 08.08.2025
التصنيف: 🛒 التجارة الإلكترونية والتسويق
إجمالي الرسائل: 2 | ياسر: 0 | M: 2
المحادثة الكاملة - 08.08.2025
M
Product Name: كوكى وجبه كاملة 12 قطعهProduct Price: 260Product Barcode: 6223001823537Product Name: توابل شرقية بانيه 20 قطعهProduct Price: 152Product Barcode: 6223001824619Product Name: حلواني فرانكفورتر 6 قطع 200 جمProduct Price: 80Product Barcode: 6221029170213
08.08.2025 18:57
M
import requestsfrom bs4 import BeautifulSoupreq = requests.get("https://www.osmanmarket.com/departments")soup = BeautifulSoup(req.text, "html.parser")links = soup.find_all("a")links = ["https://www.osmanmarket.com/" + link.get("href") for link in links if link.get("href") and link.get("href").startswith("departments/view/")]for link in links: req = requests.get(link) soup = BeautifulSoup(req.text, "html.parser") links2 = soup.find_all("a") links2 = ["https://www.osmanmarket.com/" + link2.get("href") for link2 in links2 if link2.get("href") and link2.get("href").startswith("department/")] for link2 in links2: req = requests.get(link2) soup = BeautifulSoup(req.text, "html.parser") links3 = soup.find_all("a") links3 = ["https://www.osmanmarket.com/" + link3.get("href") for link3 in links3 if link3.get("href") and link3.get("href").startswith("p/")] for link3 in links3: req = requests.get(link3) soup = BeautifulSoup(req.text, "html.parser") name = soup.find("h1").text.strip() price = int(soup.find("div", {"id": "CPH1_SUBH_Div2"}).find("span").text.strip().replace("جنيه","").strip()) barcode = int(soup.find("div", {"id": "CPH1_SUBH_Div2"}).find("b").text.strip().replace("Code :", "").strip()) print(f"Product Name: {name}") print(f"Product Price: {price}") print(f"Product Barcode: {barcode}")
08.08.2025 18:57
← العودة إلى الرئيسية