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

225
Vistas
How can I scraping function values?

I want to scraped the website with app script.

The method I use now is to fetch the html first, then use the regex to filter what I need. but it has a value that doesn't have what I want I want to retrieve the number of comments.

-but it is

{{:count}} comment enter image description here

-which what I want it should be

17 comment enter image description here

I want to know what should I do?

This is the site I want to scrape

the code I use in google sheet:

function scrapingweb() {

let sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
let values = sheet.getDataRange().getValues();
let headers = values[0];


let Link = headers.indexOf("header link from google sheet columb");

let titlename = headers.indexOf("title of web i want to scarping");



for (let i = 1; i < values.length; i++) {

    let rowData = values[i];
    let Link1 = rowData[Link]; // 
    var url = Link1

    var websiteContent = UrlFetchApp.fetch(url).getContentText();

    var titleV = new RegExp(/(?<=title>)(.*)(?= - Pantip)/m);



    var titleText = titleV.exec(websiteContent);


    sheet.getRange(i + 1, titlename + 1).setValue(titleText);



}

}

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