Development/Python(798)
-
xml 파일 쓰기, xml 파일 헤더 쓰기
xml 파일 쓰기from xml.etree.ElementTree import ElementTree parameter description output.xml 출력할 xml 파일명 encoding 파일의 인코딩방식 지정 xml_declaration True xml 파일 헤더 쓰기xml파일 생성시 write()메소드의 encoding 매개변수가 'utf-8'로 지정이 되어 있고 xml_declaration 인자가 True로 지정되어야만 xml파일 생성시 xml 파일 헤더인 이 파일의 첫라인에 추가되어집니다.
-
Selenium WebDriver
Selenium WebDriver · 웹 응용 프로그램을 가속화하거나 테스트를 할수 있게 도와주는 도구입니다. · 다양한 프로그래밍 언어와 브라우저를 지원합니다. https://www.selenium.dev/projects/
-
Selenium WebDriver 메소드
Selenium WebDriver 메소드 driver = webdriver.Chrome('C:\\CodeLab\\chromedriver_win32\\chromedriver')
-
re 모듈(regular expression)
re 모듈(regular expression) · re 모듈은 파이썬이 설치될 때 자동으로 설치되는 기본 라이브러리로 정규 표현식을 지원하기 위한 모듈입니다. · "import re"로 라이브러리를 불러온 후 정규식을 사용합니다.
-
selenium 크롤링 설정 - CHROMDRIVER
selenium 크롤링 설정selenium 패키지를 통해 크롤링하기 위해서 현재 설치되어 있는 크롬 브라우저의 버전과 동일한 크롬드라이버 파일이 함께 필요합니다. · 크롬 브라우저의 버전 정보 확인· CHROMDRIVER 다운로드· CHROMDRIVER 압축해제· selenium 크롬 드라이버 설정 크롬 브라우저의 버전 정보 확인크롬 브라이저의 주소에 아래 URL 입력하여 버전정보를 확인합니다.chrome://version/ 크롬 버전은 80.0.3987.122 입니다.
-
NotImplementedError: Only the following pseudo-classes are implemented: nth-of-type. 오류메시지, 해결방법
오류 메시지 {BequtifulSoap}에서 n번째에 위치하는 문서 객체를 선택할 경우 아래와 같은 오류메시지가 발생합니다. 변경 전 bs.select('#content > div.article > div.section > div.news_area > div > ul > li:nth-child(1) > span > a') 변경 후 bs.select('#content > div.article > div.section > div.news_area > div > ul > li:nth-of-type(1) > span > a')