If objdiv4.className = "Section" Then
Sub onmyown() Dim ie As InternetExplorer Dim doc As HTMLDocument Dim sBrand As String, sBrand1 As Integer, sBrand2 As Integer, sBrand3 As Integer, iStart As Integer, iStop As Integer Dim tr As HTMLTableRow Dim td As HTMLTableCell Set ie = New InternetExplorer ie.Visible = False ie.navigate "https://www.ebay.in/itm/Bushnell-Binocular-With-Ultra-High-Power-8-x-21mm-100m-1000m-with-Carrying-Case-/292199511233?_trksid=p2059707.m48543.l9013" Do While ie.readyState <> READYSTATE_COMPLETE Application.StatusBar = "How you Doin ..." DoEvents Loop Set doc = ie.Document With ThisWorkbook.Worksheets("Sheet1") Range("A1:N1").Merge Range("A1:N1").HorizontalAlignment = xlCenter Range("A1:N1").Cells.Interior.Color = RGB(135, 135, 135) Range("A1:N1").Cells.Font.Bold = True Range("A1:N1").Cells.Font.Size = 14 Range("A2:C2") = Array("Price", "Brand", "Specifications") Range("A2:C2").Cells.Font.Size = 12 Range("A2:C2").Cells.Font.Bold = True End With For Each objDiv In doc.getElementsByTagName("div") If objDiv.ID = "CenterPanelInternal" Then For Each objh1 In objDiv.getElementsByTagName("h1") If objh1.className = "it-ttl" Then ThisWorkbook.Worksheets("Sheet1").Range("A1:N1").Value = objh1.outerText End If Next For Each objdiv2 In objDiv.getElementsByTagName("div") If objdiv2.className = "u-flL w29 vi-price" Then ThisWorkbook.Worksheets("Sheet1").Cells(3, 1).Value = objdiv2.outerText End If Next End If If objDiv.ID = "viTabs" Then For Each objdiv3 In objDiv.getElementsByTagName("div") If objdiv3.className = "itemAttr" Then For Each objdiv4 In objDiv.getElementsByTagName("div") If objdiv4.className = "section" Then For Each td In objdiv4.getElementsByTagName("tr") If td.className = "attrLabels" Then If td.outerText = "Brand:" Then For Each tdvalue In td.getElementsByTagName("span") ThisWorkbook.Worksheets("Sheet1").Cells(3, 2).Value = tdvalue.outerText Next End If End If Next End If Next End If Next End If Next End Sub
For Each objdiv4 In objDiv.getElementsByTagName("div")
objdiv3.getElementsByTagName("div")
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)