Chapter 2 엑셀을 이용한 웹 데이터 수집의 기술 38쪽 | 엑셀에 의한 스크래핑 소스 코드 Private 인터넷익스플로러 As InternetExplorer Sub main() '인터넷 익스플로러 불러오기 Set 인터넷익스플로러 = CreateObject("InternetExplorer.Application") 검색어 = WorksheetFunction.EncodeURL("맛집") 페이지주소 = "https://search.naver.com/search.naver?where=nexearch&sm=top_hty&fbm=1&ie=utf8&query=" & 검색어 인터넷익스플로러.Visible = True 인터넷익스플로러.Navigate2 (페이지주소) '페이지 로딩 대기 While 인터넷익스플로러.ReadyState <> READYSTATE_COMPLETE Or 인터넷익스플로러.Busy = True DoEvents Application.Wait (Now + TimeValue("0:00:01")) Wend Application.Wait (Now + TimeValue("0:00:01")) '엑셀 워크시트에 검색 결과 출력하기 row = 1 For Each element In 인터넷익스플로러.Document.getElementsByClassName("sh_blog_title") Worksheets(1).Cells(row, 1) = row Worksheets(1).Cells(row, 2) = element.innerText row = row + 1 Next element 인터넷익스플로러.Quit Set 인터넷익스플로러 = Nothing End Sub 47쪽 MSHTML 참조 https://msdn.microsoft.com/en-us/library/aa752093.aspx 59쪽 =WEBSERVICE("http://www.kma.go.kr/wid/queryDFSRSS.jsp?zone=1159068000") 60쪽 =WEBSERVICE("http://www.google.com/") =WEBSERVICE(“http://www.naver.com”) 61쪽 =FILTERXML(A1, "//rss/channel/item[1]/title") 기상청 RSS 주소 http://www.kma.go.kr/wid/queryDFSRSS.jsp?zone=1159068000 62쪽 =FILTERXML(A1, "//rss/channel/title")