Last active
September 30, 2020 13:08
-
-
Save lovetoken/6878f57c854ffcdf316dd7e855428420 to your computer and use it in GitHub Desktop.
포털서비스 검색시 화면 스냅샷 적재 R 코드
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 관심 검색키워드 입력 | |
search_word <- "토트넘" | |
# 해당키워드의 다음 검색쿼리 URL 생성, 네이버 검색쿼리 URL 생성 | |
search_url_daum <- sprintf("https://search.daum.net/search?nil_suggest=btn&w=tot&DA=SBC&q=%s", search_word) | |
search_url_naver <- sprintf("https://search.naver.com/search.naver?sm=tab_hty.top&where=nexearch&query=%s", search_word) | |
# 작업디렉토리의 data 폴더에 금일자 해당키워드 다음 검색화면 PNG 파일 스냅샷 저장, 네이버 검색화면 PNG 파일 스냅샷 저장 | |
webshot(search_url_daum, file = sprintf("data/daum_%s_%s.png", search_word, Sys.Date()), delay = 0.5) | |
webshot(search_url_naver, file = sprintf("data/naver_%s_%s.png", search_word, Sys.Date()), delay = 0.5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment