mirror of
https://github.com/KUlishevgeniy/c22712.git
synced 2026-09-24 08:00:22 +00:00
parser
This commit is contained in:
@@ -1,16 +1,16 @@
|
|||||||
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
|
||||||
|
|
||||||
driver = Service('D:\GOGdriver\chromedriver.exe')
|
driver = Service('D:\GOGdriver\chromedriver.exe')
|
||||||
browser = webdriver.Chrome(service=driver)
|
browser = webdriver.Chrome(service=driver)
|
||||||
browser.get('https://www.kinopoisk.ru/lists/movies/popular-films/')
|
browser.get('https://www.kinopoisk.ru/lists/movies/popular-films/')
|
||||||
html_code = browser.page_source
|
html_code = browser.page_source
|
||||||
soup = BeautifulSoup(html_code, 'lxml')
|
soup = BeautifulSoup(html_code, 'lxml')
|
||||||
name = soup.find_all('div', class_="desktop-list-main-info_secondaryTitleSlot__mc0mI")
|
name = soup.find_all('div', class_="desktop-list-main-info_secondaryTitleSlot__mc0mI")
|
||||||
|
|
||||||
print(soup)
|
print(soup)
|
||||||
print(name)
|
print(name)
|
||||||
|
|
||||||
for i in name:
|
for i in name:
|
||||||
print(i.text)
|
print(i.text)
|
||||||
Reference in New Issue
Block a user