Forum Discussion

excelongoing's avatar
excelongoing
Copper Contributor
Jan 27, 2021
Solved

Trying to scrap lists from Ebay website but unable to do that

I have been trying to download these below lists from the ebay webiste.

Column 1: Item name
Column 2: item price
Column 3: Shipping price

But i am new to VBA and all i did and make is below code so far.

can someone please help me with this that how to scrap the required data from below link

    Sub Web_Scraping()

  Dim Internet_Explorer As InternetExplorer
  Set Internet_Explorer = New InternetExplorer
  Internet_Explorer.Visible = True
  Internet_Explorer.navigate ("https://www.ebay.com/sch/i.html?_nkw=045496902612+-Disc+-Only+-Refurbished+-Used+-Lot+-Import+-Japan+-Repro+-Reproduction+-Replacement+-VGA+-Graded+-Edition+-Edtion+-EU+-Mod+-Mods+-Moded+-modded+-Digital+-Collection+-Bundle+-Code+-Codes&LH_TitleDesc=0&LH_BIN=1&LH_Sold=1&rt=nc&LH_PrefLoc=1&LH_ItemCondition=3")
Do While Internet_Explorer.readyState <> READYSTATE_COMPLETE: Loop
  MsgBox Internet_Explorer.LocationName & vbNewLine & vbNewLine & Internet_Explorer.LocationURL
  
  
  
  For Each item In respJSON("QuickQuoteResult")("QuickQuote")
    ThisWorkbook.Worksheets(1).Cells(i, "A") = item("Item name")
    ThisWorkbook.Worksheets(1).Cells(i, "B") = item("item price")
    ThisWorkbook.Worksheets(1).Cells(i, "C") = item("Shipping price")
  
End Sub


2 Replies