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

162
Vistas
What is role the of url in async function in web scrapping

I am working on web scrapping and I came across one scenario where I am get confused about arrow key function,I am unable to understand why url is used twice and how it is actual working, I know it is advanced javascript but I need some explanation to understand this completely.

first Url in arrow function:

const fethHtml = async url => {

Second url pass in axios.get

await axios.get(url);

const fethHtml = async url => {

const axios = require("axios").default;

const fethHtml = async url => {
  try {
    const { data } = await axios.get(url);
    return data;
  } catch {
    console.error(
      `ERROR: An error occurred while trying to fetch the URL: ${url}`
    );
  }
};

My question is what url is indicating here is it variable or function and why it is called twice, I didn't found any explanation anywhere.

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

0

const fethHtml = async url => {

url is just arguments. (ex:google.com)

then pass the arguments to axios to get resposne.

await axios.get(url);

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