Add files via upload

This commit is contained in:
TatianaFilcheva
2023-03-23 08:36:57 +03:00
committed by GitHub
parent 57309fe9c5
commit 43414b5461
+12
View File
@@ -0,0 +1,12 @@
from bs4 import BeautifulSoup
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from time import sleep
s = Service("C:\Driver\chromedriver.exe")
browser = webdriver.Chrome(service=s)
browser.get("https://mephi.ru/")
sleep(10)
html_text = browser.page_source
soup = BeautifulSoup(html_text, "lxml")
serv = soup.find_all("div", class_="views-field views-field-title menu-item menu-item-10702")
print(serv[0].text)