This commit is contained in:
Harutyun
2023-02-27 23:58:17 +03:00
parent 2f6dcba538
commit b055afe3f7
+4 -4
View File
@@ -4,9 +4,9 @@ from selenium.webdriver.chrome.service import Service
s = Service("E:\data\chromedriver.exe")
browser = webdriver.Chrome(service=s)
browser.get("https://www.litres.ru/fedor-dostoevskiy/prestuplenie-i-nakazanie/")
browser.get("https://ria.ru/")
html_text = browser.page_source
soup = BeautifulSoup(html_text, 'lxml')
books = soup.find_all('div', class_='biblio_book_descr')
for book in books:
print(book.text)
news = soup.find_all('div', class_='cell cell-list')
for new in news:
print(new.text)