I already had one person's help to get the code and I got it working without problems.
Now I think the site has changed and now I can not get results.
I basically wanted to have the links of the images in a column. The code I was using was as follows:
but now it does not return results.
I've tried changing the selector to:
but it did not work.
Can someone help please? What have I done wrong to change in the next?
Website I want to get the pictures: https://www.gearbest.com/cell-phones...601631974.html
Now I think the site has changed and now I can not get results.
Code:
[COLOR=#454545][FONT="][B]Public Function getHeroImage(productUrl As String) As String[/B][/FONT][/COLOR]
[COLOR=#454545][FONT="]
[/FONT][/COLOR]
[COLOR=#454545][FONT="][B] Dim dom As HTMLDocument[/B][/FONT][/COLOR]
[COLOR=#454545][FONT="][B] Set dom = New HTMLDocument[/B][/FONT][/COLOR]
[COLOR=#454545][FONT="][B] With CreateObject("winhttp.winhttprequest.5.1")[/B][/FONT][/COLOR]
[COLOR=#454545][FONT="][B] .Open "GET", productUrl, False[/B][/FONT][/COLOR]
[COLOR=#454545][FONT="][B] .send[/B][/FONT][/COLOR]
[COLOR=#454545][FONT="][B] dom.body.innerHTML = .responseText[/B][/FONT][/COLOR]
[COLOR=#454545][FONT="][B] getHeroImage = dom.querySelector("div.goodsIntro_largeImgWrap > img").getAttribute("data-zoom")[/B][/FONT][/COLOR]
[COLOR=#454545][FONT="][B] End With[/B][/FONT][/COLOR]
[COLOR=#454545][FONT="]
[/FONT][/COLOR]
[COLOR=#454545][FONT="][B]End Function[/B][/FONT][/COLOR]
but now it does not return results.
I've tried changing the selector to:
Code:
[COLOR=#454545][FONT="][B]dom.querySelector ("div.goodsIntro_largeImgWrap> # js-goodsNormalImg> img"). getAttribute ("data-zoom")[/B][/FONT][/COLOR]
Can someone help please? What have I done wrong to change in the next?
Website I want to get the pictures: https://www.gearbest.com/cell-phones...601631974.html