컴퓨터에 설치된 크롬과

ChromeDriver의 버전이 맞지 않아서 발생한 오류

 

해결방법은

-> 두 버전을 동일하게 맞춰주면 된다.

 

파이썬에서 ChromeDriver 를 호출하게 되면

This version of ChromeDriver only supports Chrome version 85 와 같이 메시지가 나오게 된다.

 

위 의미는 지금 ChromeDriver의 버전은 85 라는 것이고,

현재 컴퓨터에 설치된 Chrome은 버전이 85가 아니라는 얘기이다.

 

그럼 둘 중에 하나의 버전을 동일하게 맞춰주면 된다.

좀 더 쉬운 방법은 ChromeDriver의 버전을 맞춰주는 것

왜냐면 ChromeDriver 다운로드 사이트는 버전별로 제공해주고 있으니까

 

아래가 그 사이트이다.

 

sites.google.com/a/chromium.org/chromedriver/downloads

conda env list

 

 

64bit 아나콘다 환경에서 32bit 아나콘다 가상환경 사용하기

 

1.      set CONDA_FORCE_32BIT =1                                

# 32bit 환경 세팅

 

 

2.      conda create -n py32 python=3.7 anaconda        

# 아나콘다 32bit 가상화 설치 ( venv32 는 원하시는 이름으로 교체)

 

 

3.      activate py32                                                        

# 가상환경 활성화

 

 

3 - 1. deactivate                                                              

         # 가상환경 비활성화

 

3 - 2  conda env list                                                          

         # 가상환경 이름 리스트 보기

 

4.      conda update pyqt

#가상환경(activate py32) 실행상태에서 pyqt업데이트하기



출처: https://redapply.tistory.com/entry/64bit-아나콘다에서-32bit-파이썬-환경으로-사용하기

string = string.replace(u'\xa0', u' ')

solution by pyperclip

 

 

import pyautogui

import pyperclip

 

pyperclip.copy("한글")

pyautogui.hotkey("ctrl", "v")

for example

- <tr id="abc1"> ... <tr id="abc2"> ... <tr id="abc9">

 

===================================

 

 

from bs4 import BeautifulSoup

import re

 

driver.get('http://aigwon.tistory.com')

html = driver.page_source

bsObject = BeautifulSoup(html,"html.parser")

 

crawling_test = bsObject.findAll('tr', id=re.compile('^abc-'))

 

 

 

(X) pip install cv2

 

 

(O) pip install opencv-python

 

 

and...

 

 

import cv2

 

 

1. Check setting environment variables - python PATH

 

2. Command the following prompt on windows CMD

 - python -m ensurepip

 

3. Command the following prompt on Anaconda Prompt

 - python -m ensurepip

 

 

from urllib.request import urlopen
from bs4 import BeautifulSoup

 

html = urlopen('http://www.naver.com/')
bsObject = BeautifulSoup(html,"html.parser")

title_list = bsObject.select('.PM_CL_realtimeKeyword_rolling .ah_k')
for i, title in enumerate(title_list):
    print(i+1, ":" , title.get_text())

 

#####################

# drag from here for test  #

#####################

import openpyxl

 

# open excel file

wb = openpyxl.load_workbook('excel_file_name.xlsx')

 

# read active sheet

ws = wb.active

    # (another mothod) read sheet by name

    # ws = wb.get_sheet_by_name("Sheet1")

 

 

# read row data

count = 1;
for r in ws.rows:

    if not r[0].value:

        # (another mothods) check None data of Excel

        # if r[0].value == None:

        # if r[0].value is None:

        print("row[", count , "].value : None")

 

    count++

 

 

# close opened Excel file

wb.close()

###################

# drag to here for test  #

###################

 

 

 

 

- excel_file_name.xlsx

 

Execution result

 

+ Recent posts