RSelenium 으로 웹크롤링을 하면서 얻은 팁을 공유합니다. 본 내용은 Zarathu가 후원하는 Shinykorea 1월 밋업에서 발표할 예정입니다.
김진섭 대표는 Zarathu 가 후원하는 1월 Shinykorea 밋업에 참석, RSelenium 으로 웹크롤링을 하면서 얻은 팁을 공유할 예정입니다. 정리한 슬라이드를 미리 공유합니다.
웹에 로그인 후 클릭기반 데이터 다운받는 과정을 RSelenium 으로 자동화 하였다.
Selenium docker image 를 이용, 복잡한 설치과정 없이 Selenium 을 실행하고 다운로드 경로를 설정하였다.
findElement
와 sendKeysToElement
, clickElement
를 이용, 아이디와 비번을 입력하고 로그인버튼을 클릭하였다.
clickElement
이 안될 때 mouseMoveToLocation
과 click
을 이용, 마우스로 클릭하였다.
작업 팝업창을 바꾸는 switchToWindow
가 안될 때, queryRD
로 자체 함수를 만들어 작업하였다.
50개 일별 데이터 다운로드에 성공하였다.
아래 슬라이드를 보거나 https://jinseob2kim.github.io/LectureRpackage/RSelenium 를 클릭하면 볼 수 있다.
If you see mistakes or want to suggest changes, please create an issue on the source repository.
Text and figures are licensed under Creative Commons Attribution CC BY 4.0. Source code is available at https://github.com/zarathucorp/blog, unless otherwise noted. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".
For attribution, please cite this work as
Kim (2019, Nov. 30). Zarathu Blog: RSelenium 이용 팁. Retrieved from https://blog.zarathu.com/posts/2019-11-30-rseleniumtip/
BibTeX citation
@misc{kim2019rselenium, author = {Kim, Jinseob}, title = {Zarathu Blog: RSelenium 이용 팁}, url = {https://blog.zarathu.com/posts/2019-11-30-rseleniumtip/}, year = {2019} }