Linux

CentOS 7 +python3 web crawling 순서

브이랜 2021. 10. 16. 17:43

1. Python3 설치

1
yum -y install python3
cs

 

2. Selenium + bs4 + telegram 설치

1
2
3
4
pip3 install -U pip
pip3 install beautifulsoup4
pip3 install selenium
pip3 install python-telegram-bot --upgrade
cs

 

3. chrome 설치

1
yum -y install https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
cs

 

4. chromedriver 다운로드 + 위치이동 (https://sites.google.com/chromium.org/driver/)

1
2
3
wget https://chromedriver.storage.googleapis.com/94.0.4606.61/chromedriver_linux64.zip
unzip chromedriver_linux64.zip
cp chromedriver /usr/bin/
cs

 

5. html 소스 분석 및 파싱

6. crontab 등록