Este fórum está sendo desativado

Depois de 9 anos, este fórum será desativado. Mas calma.... estamos migrando para uma comunidade no DISCORD. Junte-se a nós.

ENTRAR PARA DISCORD

Tópicos relacionados a códigos VBA, gravação de macros, etc.
Por tactos
#39806
Boa noite,
Já tive uma pessoa que me ajudou a extrair os links das imagens de um site.
Agora não está a funcionar pois eu acho que houve uma alteração no site e por isso devolve erro.
Até agora funcionou bem com o seguinte código:
Código: Selecionar todos
Public Function getHeroImage(productUrl As String) As String

    Dim dom As HTMLDocument
    Set dom = New HTMLDocument
    
    With CreateObject("winhttp.winhttprequest.5.1")
        .Open "GET", productUrl, False
        .send
        dom.body.innerHTML = .responseText
        getHeroImage = dom.querySelector("div.goodsIntro_largeImgWrap > img").getAttribute("data-zoom")
    End With

End Function
Já experimentei alterar a seguinte linha:
Código: Selecionar todos
dom.querySelector ("div.goodsIntro_largeImgWrap> # js-goodsNormalImg> img"). getAttribute ("data-zoom")
Mas não funcionou.
Alguém me pode ajudar por favor?
O site que pretendo os links é o seguinte:
https://pt.gearbest.com/cell-phones/pp_ ... 31974.html

Obrigado a todos
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]

Estamos migrando para uma comunidade no Discord