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

224
Visualizações
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 à 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