Delete 1-sq.py

This commit is contained in:
VladEpifanov
2023-03-23 11:09:37 +03:00
committed by GitHub
parent 43414b5461
commit ae1517aed9
-13
View File
@@ -1,13 +0,0 @@
from bs4 import BeautifulSoup
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
s = Service('C:\Desktop\exe\chromedriver.exe')
browser = webdriver.Chrome(service=s)
browser.get('https://www.rftoday.ru/_vse_zagolovki2')
html_text = browser.page_source
soup = BeautifulSoup(html_text, 'lxml')
infos = soup.find_all(attrs={"class": "title"})
#print(infos[0].text) - если нужно вывести только n-ый заголовок
for info in infos:
print(info.text)#Вывод всех заголовков новостей страницы 1