From 72a6fbe1c9db73e239abc25cb6d482bb7ef9aca0 Mon Sep 17 00:00:00 2001 From: 13danny13 Date: Wed, 22 Mar 2023 22:25:38 +0300 Subject: [PATCH] parcing --- parcing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parcing.py b/parcing.py index c006b33..c5ef82a 100644 --- a/parcing.py +++ b/parcing.py @@ -9,6 +9,6 @@ browser.get('https://trial-sport.ru/gds.php?s=51516&c1=1070639&c2=1070640') html_text = browser.page_source soup = BeautifulSoup(html_text, 'lxml') bike_name=soup.find_all('a', class_='title') -print (bike_name[0].text) description=soup.find_all('span', class_='description') -print (description[0].text) \ No newline at end of file +for bike_name, description in zip(bike_name, description): + print(f"Продукт: {bike_name.text} \nОписание: {description.text}") \ No newline at end of file