Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

339
Visualizações
How can I get an image, script, or other asset from a site that's displaying it for a src to be able to use in HTML?

I'm currently working with a proxy, and have run into the issue that images are not proxied, so my solution is to rewrite the various URLs and src attributes to be passed through my proxy. However, I've run into an issue where after running them through my proxy, the image is displayed, instead of processed in a way where the image can be then ripped by an <img> or <script> tag src.

function edit(){  
        var proxy_url = "----insert proxy query here----";
        var srcNodeList = document.querySelectorAll('[src],[href]');

        console.log(srcNodeList)
        for (var i = 0; i < srcNodeList.length; ++i) {
            console.log("Prior: " + srcNodeList[i].src + " | " + srcNodeList[i].href)
            if(srcNodeList[i].src){
                srcNodeList[i].src = proxy_url + srcNodeList[i].src;
            }
            if(srcNodeList[i].href){
                srcNodeList[i].href = proxy_url + srcNodeList[i].href;
            }
            console.log("   Modded: " + srcNodeList[i].src + " | " + srcNodeList[i].href+"\n")
        }                         
    }
    edit()

The issue lies where after passing the image through the proxy, such as https://proxynamehere.com?url=imagedirectorylink.com/img.img that it's only displayed, so using it then as a src provides no image.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda