Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 웹페이지 크롤링에서 API 방식으로 변경하기 #9

Open
PortalCube opened this issue May 26, 2023 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@PortalCube
Copy link
Owner

1685090433_IBNh_chrome

1685087436_aw67_chrome

개발 도중에 문득 코스모스 공식 앱의 존재가 떠올랐는데, 코스모스 공식 앱은 웹페이지 크롤링 방식이 아닌 RESTful API 통신을 사용하지 않을까 싶었음.

아니나 다를까, 직접 확인을 해본 결과 공식 앱은 전용 API 서비스를 사용하고 있었음.

API 구조를 좀 더 파악해보고, API 방식이 크롤링 방식에 비해서 확실한 이점을 갖는 경우 API 방식으로 전환하겠음.

@PortalCube
Copy link
Owner Author

PortalCube commented May 26, 2023

현재까지 밝혀진 API 방식 장점

  • 로딩 속도가 현저히 빠름. (불필요한 HTML 서식이 빠짐 + 불필요한 요청이 하나로 통합됨)
  • 할 일 목록을 하나의 요청으로 싹 불러올 수 있음 (단, 디테일한 정보를 함께 가져오지 못함)
  • 온라인 강의의 경우, 매일 1회의 인증이 필요한데 전용 API는 인증을 bypass할 수 있음 (읽기만 확인함. 과제 제출 or 영상 시청은 미확인.)
  • 크롬 익스텐션에서 직접 로그인을 관리할 수 있음. (웹페이지 방식은 HttpOnly 쿠키로 저장되므로 확장프로그램이 로그인 토큰을 조작할 수 없음)

단점

  • 로그인을 직접 관리해야함. (익스텐션 메뉴에서 로그인 기능을 따로 구현해야 함)

@PortalCube PortalCube added the enhancement New feature or request label May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant