Добрый день, дорогие форумчане!
Помогите "чайнику" понять как вытащить адрес ссылки в переменную из <a href = ( только начал изучать VBA, HTML, DOM )-?
Помогите "чайнику" понять как вытащить адрес ссылки в переменную из <a href = ( только начал изучать VBA, HTML, DOM )-?
Код |
---|
Sub my_first_parser() Dim iExp As Object Dim htmlDoc As HTMLDocument Dim uRL As String Dim namePr, namePr2 As Object Set iExp = New InternetExplorer iExp.Visible = True iExp.navigate "[URL=http://homearts.ru/shop]http://homearts.ru/shop[/URL]" Do While iExp.Busy = True Or iExp.READYSTATE <> 4: DoEvents: Loop Set htmlDoc = iExp.Document For Each namePr In htmlDoc.getElementById("menu").getElementsByTagName("li") For Each namePr2 In namePr.getElementsByTagName("li") Debug.Print namePr2.innerHTML Next Next iExp.Quit End Sub |