Crawling
0. 크롤링 하기 위한 준비 작업
km1n
2021. 12. 30. 14:41
#Step -1. 크롬드라이버 설치 못하고 결국 이거 씀
!pip install chromedriver_autoinstaller
#Step 0. 필요한 모듈과 라이브러리를 로딩.
import sys # 시스템
import os # 시스템
import pandas as pd # 판다스 : 데이터분석 라이브러리
import numpy as np # 넘파이 : 숫자, 행렬 데이터 라이브러리
from bs4 import BeautifulSoup # html 데이터를 전처리
from selenium import webdriver # 웹 브라우저 자동화
from selenium.webdriver.common.keys import Keys
import chromedriver_autoinstaller
import time # 서버와 통신할 때 중간중간 시간 지연. 보통은 1초
from tqdm import tqdm_notebook # for문 돌릴 때 진행상황을 %게이지로 알려준다.
# 워닝 무시
import warnings
warnings.filterwarnings('ignore')
# python 버전 확인
!python --version
# 판다스 버전 확인
pd.__version__
!pip install selenium #selenium설치
# 검색어, 검색 기간 정의
query_txt = input('1.크롤링할 키워드는 무엇입니까?: ')
query_txt