diff --git a/Задания/task1/romanov/num1 b/Задания/task1/romanov/num1 index 34ad16a..e69de29 100644 --- a/Задания/task1/romanov/num1 +++ b/Задания/task1/romanov/num1 @@ -1 +0,0 @@ -def print_hi(' hello') \ No newline at end of file diff --git a/Задания/task1/romanov/parcinghellride.py b/Задания/task1/romanov/parcinghellride.py new file mode 100644 index 0000000..e36d091 --- /dev/null +++ b/Задания/task1/romanov/parcinghellride.py @@ -0,0 +1,14 @@ +from bs4 import BeautifulSoup +from selenium import webdriver +from selenium.webdriver.chrome.service import Service + +s = Service('C:\Desktop\exe\chromedriver.exe') +browser = webdriver.Chrome(service=s) +browser.get('https://www.hellride.ru/catalog/zapchasti-dlya-tryukovyh-samokatov/deki') +html_text = browser.page_source +soup = BeautifulSoup(html_text, 'lxml') +prices = soup.find_all(attrs={"class": "product-card__price"}) +titles = soup.find_all(attrs={"class": "product-card__title"}) + +for price, title in zip(prices, titles): + print(f" название {title.text} ; цена: {price.text}") \ No newline at end of file