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

123
Vistas
Use node-fetch v2.6 to get HTML of a website

Currently my code is the following:

const fetch = require("node-fetch");

(async function () {
  console.log(await fetch("https://a.website.in-ht.ml"));
})()

However, It is only returning data on the website, as opposed to the HTML. Anyone know what the issue may be?

(As the title says, I am using v2.6 not 3.0+)

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Try this:

const fetch = require("node-fetch");

(async function () {
  const res = await fetch("https://a.website.in-ht.ml")
  const html = await res.text()
  console.log(html)
})()

This takes the text response instead of the full response.

about 4 years ago · Juan Pablo Isaza Denunciar
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