블로그 이미지
이비그치면

태그목록

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

글 보관함

calendar

1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

셀레니움(selenium) 사용하기

2023. 3. 20. 10:15 | Posted by 이비그치면

1. cmd 창에서      

    pip install selenium

    아래와 같은 설치 error 시

 ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
requests 2.24.0 requires urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1, but you have urllib3 1.26.15 which is incompatible.

    pip uninstall selenium

    pip install -U selenium

 

2. chrome version 확인

   제일 우측의 점3 클릭 --> 도움말 --> chrome정보 

3. 해당 version에 맞는 chrom webdriver 설치

    사이트( http://chromedriver.chromium.org/downloads)에서 위에서 찾은 version에 해당하는 다운로드 찾아서

   해당하는 버전확인후(노란색 하이라이트 부분) 클릭하고 

     노란색부분 클릭

    압축을 풀어 python설치폴더로 옮기거나 

    압축풀때 python설치폴더 지정하여 압축해제

 

4. 이제 정상적으로 설치됐는지 확인

     다음고 같은 코드 python IDLE에서  입력하여 실행하고 

>>> import selenium
>>> from selenium import webdriver
>>> from selenium.webdriver.common.keys import Keys
>>> driver = webdriver.Chrome() 

여기에서 다음과 같은 에러메세지 나오면

selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 111
Current browser version is 81.0.4044.138 with binary path C:\Program Files (x86)\Google\Chrome\Application\chrome.exe   

>>> from selenium.webdriver.chrome.options import Options
>>> options = Options()
>>> options.binary_location = "C:\\Program Files\Google\Chrome\Application\\chrome.exe"

>>> driver = webdriver.Chrome(chrome_options = options)

chrome browser가  뜨는지 확인

 

다음과 같이 구글 사이트에 접속

>>> driver.get('http://google.com/')

 

다음과 같이 입력하여 테스트 종료 (위의 크롬 화면 close)

>>> driver.quit()

 

여호와께서 가인의 범죄 후 가인에 이렇게 말씀하셨습니다. 네가 선을 행하면 어찌 낯을 들지 못하겠느냐 선을 행하지 아니하면 ()가 문에 엎드려 있느니라 ()가 너를 원하나 너는 ()를 다스릴지니라(4:7). 답:죄

여기에서 (4:7) 삭제하여

여호와께서 가인의 범죄 후 가인에 이렇게 말씀하셨습니다. 네가 선을 행하면 어찌 낯을 들지 못하겠느냐 선을 행하지 아니하면 ()가 문에 엎드려 있느니라 ()가 너를 원하나 너는 ()를 다스릴지니라. 답:죄

\(([^)]+)\)

 

 

내가 기뻐하는 금식

2022. 7. 23. 21:09 | Posted by 이비그치면

not 내몫 줄이기

but 내몫 덜어내기

'Chrisitianity' 카테고리의 다른 글

신라면과 만유의 주재  (0) 2024.05.02
시편 4장 4절  (0) 2021.11.04
성경 신구약 한자단어 출현빈도 분석  (0) 2016.04.05
회복 && 치유 센터  (0) 2015.10.29
다윗의 장애인 차별??(삼하 5:8)  (0) 2013.07.12
이전 1 2 3 4 5 6 7 ··· 62 다음