mirror of
https://github.com/KUlishevgeniy/c22712.git
synced 2026-09-24 08:00:22 +00:00
Gang
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
from bs4 import BeautifulSoup
|
||||
from selenium import webdriver
|
||||
from selenium.webdriver.chrome.service import Service
|
||||
import time
|
||||
|
||||
s = Service('C:/Users/rusta/OneDrive/Рабочий стол/ИНФА/инфа 2 сем/driver/chromedriver.exe')
|
||||
browser = webdriver.Chrome(service=s)
|
||||
browser.get('https://lafoy.ru/modnye-muzhskie-strizhki-2023-3052/')
|
||||
time.sleep (10)
|
||||
html_text = browser.page_source
|
||||
soup = BeautifulSoup(html_text, 'lxml')
|
||||
haircuts = soup.find_all('h2', class_='tm8 post__title')
|
||||
|
||||
for i in range(0, 30):
|
||||
print(haircuts[i].text)
|
||||
Reference in New Issue
Block a user