mirror of
https://github.com/KUlishevgeniy/c22712.git
synced 2026-09-23 23:50:21 +00:00
New commit for parsing
This commit is contained in:
@@ -1,15 +1,14 @@
|
|||||||
>>> from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
>>> from selenium import webdriver
|
from selenium import webdriver
|
||||||
>>> from selenium.webdriver.chrome.service import Service
|
from selenium.webdriver.chrome.service import Service
|
||||||
>>> s = Service('C:\\Users\\Dasha\\Desktop\\Progect\\chromedriver.exe')
|
s = Service('C:\\Users\\Dasha\\Desktop\\Progect\\chromedriver.exe')
|
||||||
>>> browser = webdriver.Chrome(service=s)
|
browser = webdriver.Chrome(service=s)
|
||||||
>>> browser.get('https://www.livelib.ru/selection/907286-vybor-redaktsii-elle-girl')
|
browser.get('https://www.livelib.ru/selection/907286-vybor-redaktsii-elle-girl')
|
||||||
>>> html_text=browser.page_source
|
html_text=browser.page_source
|
||||||
>>> soup=BeautifulSoup(html_text, 'lxml')
|
soup=BeautifulSoup(html_text, 'lxml')
|
||||||
>>> infos = soup.find_
|
infos = soup.find_
|
||||||
>>> films=soup.find_all(attrs={"class": "brow-book-name with-cycle"}
|
films=soup.find_all(attrs={"class": "brow-book-name with-cycle"})
|
||||||
)
|
for film in films:
|
||||||
>>> for film in films:
|
|
||||||
print(film.text)
|
print(film.text)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user