Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

223
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!