Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

336
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda