mirror of
https://github.com/KUlishevgeniy/c22712.git
synced 2026-09-24 08:00:22 +00:00
parser
This commit is contained in:
@@ -4,9 +4,9 @@ from selenium.webdriver.chrome.service import Service
|
|||||||
|
|
||||||
s = Service("E:\data\chromedriver.exe")
|
s = Service("E:\data\chromedriver.exe")
|
||||||
browser = webdriver.Chrome(service=s)
|
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
|
html_text = browser.page_source
|
||||||
soup = BeautifulSoup(html_text, 'lxml')
|
soup = BeautifulSoup(html_text, 'lxml')
|
||||||
books = soup.find_all('div', class_='biblio_book_descr')
|
news = soup.find_all('div', class_='cell cell-list')
|
||||||
for book in books:
|
for new in news:
|
||||||
print(book.text)
|
print(new.text)
|
||||||
|
|||||||
Reference in New Issue
Block a user