from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from webdriver_manager.chrome import ChromeDriverManager
driver = webdriver.Chrome(ChromeDriverManager().install())
try:
driver.get('https://search.naver.com/')
elem = driver.find_element_by_id('query')
elem.send_keys('텐핑')
elem.send_keys(Keys.RETURN)
elem = driver.find_element_by_class_name('company_area')
print(elem.text)
input()
except Exception as e:
print(e)
finally:
driver.quit()
'키워드' 로 검색하는 프로그램 입니다.
'HTML > HTML' 카테고리의 다른 글
[HTML] HREF 란? (0) | 2023.02.16 |
---|---|
[HTML] Button text 바꾸기 (0) | 2022.09.16 |
[HTML] 왜 HTML은 Programming Language가 아닌가? (0) | 2022.08.19 |
[Python_HTML] 파이썬 웹 크롤링 (0) | 2021.03.04 |
댓글