Skip to content

Commit

Permalink
fix: 크롤링 오류 수정 (렌더링 시간보다 크롤러가 더 빠른 오류)
Browse files Browse the repository at this point in the history
  • Loading branch information
hanjo8813 committed Jan 2, 2022
1 parent 7da1305 commit 1207807
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,23 +174,24 @@
<br>

## ⚙ 시스템 아키텍처

<image width="750" src="https://user-images.githubusercontent.com/71180414/147886640-57921cef-8cdd-4347-a659-cf49b1bc4c42.png"/>

![PG 아키텍처](https://user-images.githubusercontent.com/71180414/125759854-a7b24966-b2ca-4da8-884d-0f419f86ad7f.png)

- Github Actions를 사용하여 CI/CD 파이프라인을 구축하였습니다.
- Django의 고유 패턴인 MVT(Model/View/Template)패턴을 사용하였습니다.
- 프론트엔드는 Django Template Engine을 사용해 SSR 방식으로 렌더링합니다.
- 일일 방문자수 구현을 위해 django-crontab을 사용하였습니다.
- AWS 로드 밸런서와 Nginx를 사용해 로드밸런싱리다이렉팅을 구현하였습니다.
- Nginx를 사용하여 리다이렉트정적 파일을 제공합니다.

<br>

## 📜 기술 스택

### Front, Backend
- Django
- Python 3.9
- Django 3.1.4
- MySQL 8.0.25
- AJAX
- MySQL


### Library
- Selenium
Expand All @@ -201,11 +202,10 @@
- django-crontab

### Infrastructure
- AWS EC2
- AWS Elastic Load Balancer
- AWS Route 53
- AWS Certificate Manager
- Github Actions
- AWS EC2, RDS
- nginx
- uwsgi

- docker, docker-compose

<br>
2 changes: 2 additions & 0 deletions app/views/crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def selenium_DHC(id, pw):
# 크롬 드라이버 실행
driver = webdriver.Chrome('./dev/chromedriver.exe', options=options)
driver.get(url)
time.sleep(0.5)
# 키보드 보안 해제
driver.find_element_by_xpath('//*[@id="login_form"]/div[2]/div/div[2]/div[3]/label/span').click()
driver.switch_to_alert().dismiss()
Expand Down Expand Up @@ -84,6 +85,7 @@ def selenium_DHC(id, pw):
# 크롬드라이버 열기
driver = webdriver.Chrome('/srv/chromedriver', options=options)
driver.get(url)
time.sleep(0.5)
# 키보드 보안 해제
driver.find_element_by_xpath('//*[@id="login_form"]/div[2]/div/div[2]/div[3]/label/span').click()
driver.switch_to_alert().dismiss()
Expand Down
6 changes: 4 additions & 2 deletions dev_record.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@

## 개발/업데이트 기록

## 01/03
- 서버 이전 및 CI/CD 파이프라인 구축 (v2.0.4 -> v2.1.4) ([자세히](https://github.com/hanjo8813/PleaseGraduate/issues/61))
### 01/03
- **version 2.1.4 배포**
- 서버 이전 및 CI/CD 파이프라인 구축 ([자세히](https://github.com/hanjo8813/PleaseGraduate/issues/61))
- 파일 분리 리팩토링 및 환경별 settings(profile) 분리

### 12/30
> 총 방문자 수 : `14261` / 총 사용자 수 : `2668`
Expand Down

0 comments on commit 1207807

Please sign in to comment.