This commit is contained in:
Harutyun
2023-02-17 00:44:31 +03:00
parent e0a6b64d88
commit d1a1d9c373
+12
View File
@@ -0,0 +1,12 @@
from bs4 import BeautifulSoup
from selenium import webdriver
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/")
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)