네이버 부동산 매물 상세정보를 가져오고 싶어서 VBA 열심히 작성중인 엑셀초보입니다

detail_ledger_table 클래스 안에 detail_cell_data 클래스 가 여러개 있습니다.

detail_cell_data 클래스들에 있는 값을 가져오고 싶어 아래처럼 작성을 했는데

값을 가져오지 못합니다.

HTMLDoc.getElementsByClassName("detail_ledger_table") 이 클래스의 값도 못 받아오는데 왜그러는걸까요..

초보로서는 어디가 잘못된지도 잘 모르겠어서 이렇게 질문드립니다.

 

 

해당 주소 : https://m.land.naver.com/article/info/2202665568

Sub Web_scarping()

Dim MyBrowser As InternetExplorer
Dim HTMLDoc As HTMLDocument
Dim iArticle As IHTMLElement
Dim dArticle As IHTMLElement
Dim i As Long

Debug.Print "test..... "

'// 익스플로어(XML변수 설정)
Set MyBrowser = Sheet1.WebBrowser1
MyBrowser.Silent = True

'// 검색 (XML 요청)
With MyBrowser
.Navigate Sheet1.Range("C3").Value

Wait_Browser MyBrowser

'// HTML 추출
Set HTMLDoc = .Document

i = 7

Debug.Print "test1 "
'// 개체검색 detail_ledger_table
For Each iArticle In HTMLDoc.getElementsByClassName("detail_ledger_table")
Debug.Print "test2 "
For Each dArticle In iArticle.getElementsByClassName("detail_cell_data")
'// 요소별 값 추출

Sheet1.Cells(i, 2) = dArticle(0).innerText

i = i + 1
Debug.Print "test3 "

Next
Next

End With

End Sub