커뮤니티
포인트
쿠폰
내 강의실
국비 신청 내역
증명서
계정
로그아웃
학습 질문
개발 일지
나의 활동
답변 완료
기본 개념 설명 좀 해주세요
[왕초보] 칼퇴를 부르는 파이썬 업무 자동화
2주차
북마크
엄*용
댓글
1
추천
0
조회수
8
조회수
8
답변 완료

* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.

* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.


  • 팔레트가 뭔가요?
  • 셀레니움이 뭔가요?
  • 선택자가 뭔가요? 선택자별로 코드가 어떻게 다른가요?


  • 아래의 각 함수들과 기능들이 뜻하는 게 뭔가요?
  • chrome_options, driver, find_element, by, CLASS_NAME 이 뜻하는게 뭔가요?
  • CLASS_NAME만 대문자로 쓰는 이유가 있나요?



from selenium import webdriver

from selenium.webdriver.chrome.options import Options

from selenium.webdriver.common.by import By


chrome_options = Options()

chrome_options.add_experimental_option("detach", True)

chrome_options.add_experimental_option("excludeSwitches", ["enable-logging"])

driver = webdriver.Chrome(options=chrome_options)


driver.get("https://product.kyobobook.co.kr/bestseller/online?period=001&page=1&per=50")


books_elements = driver.find_elements(By.CLASS_NAME, 'prod_item')



  • CLASS_NAME을 쓰는 경우와 CSS_SELECTOR를 쓰는 경우는 어떻게 다른가요?






취소
 공유
취소
댓글 0
댓글 알림
나의얼굴