본문 바로가기
반응형

분류 전체보기87

Python + Selenium 도메인 여러 개 크롤링하기 도메인 여러 개를 리스트에 넣어두고 여러 사이트를 순차적으로 크롤링할 수 있는 방법에 대해 설명해보도록 하겠습니다. url에 따라 선택자를 다르게 설정하여 코드를 작성할 수 있습니다. 아래 코드를 참조해주세요. from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC import re driver = webdriver.Chrome() urls = ['https://example.com/a', 'https://exam.. 2023. 6. 30.
Python + Selenium 특정 요소가 로드된 후 원하는 데이터 가지고 오기(선택자 종류 소개) 2023.06.29 - [공부기록/파이썬] - Python + Selenium으로 크롤링 시작하기(예제 있음) 파이썬에서 셀레니움을 시작하는 방법은 위 글을 참조해주세요. * WebDriverWait 클래스와 expected_conditions 모듈을 사용하여 특정 요소가 로드된 이후 원하는 데이터를 가지고 올 수 있습니다. * 아래 코드를 참조해주세요.from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC # 웹.. 2023. 6. 30.
mssql server 복원시 오류 Restore failed for Server '*'. (Microsoft.SqlServer.SmoExtended) mssql server 복원시 아래 오류 해결방법(윈도우 기준) Restore failed for Server '*. (Microsoft.SqlServer.SmoExtended) 윈도우 서비스에 들어가서 SQL Server를 중지 후 다시 시작한다.Microsoft SQL Server Management Studio를 껐다 킨다. 그래도 똑같은 오류가 난다면 SQL을 사용하고 있는 프로그램을 모두 종료한다. 나같은 경우엔 이클립스를 끄니까 제대로 동작했다. 2023. 6. 29.
Python + Selenium으로 크롤링 시작하기(예제 있음) 1. 셀레니움 설치 먼저, Python에 셀레니움을 설치해야 합니다. 아래 명령을 사용하여 셀레니움을 설치할 수 있습니다.pip install selenium 2. 웹 드라이버 다운로드 셀레니움은 웹 브라우저를 제어하기 위해 웹 드라이버를 사용합니다. 웹 드라이버는 사용할 웹 브라우저에 따라 다릅니다. 가장 흔한 크롬 드라이버를 설정해보도록 하겠습니다. https://sites.google.com/chromium.org/driver/downloads ChromeDriver - WebDriver for Chrome - DownloadsCurrent Releases If you are using Chrome version 115 or newer, please consult the Chrome for Test.. 2023. 6. 29.
728x90
반응형