Bollywood Movie 'ANIMAL' Watch Today!

Download Now!

adsterra
المشاركات

Npl table latest - Updated

Nepal Premier League — Points Table

Loading…

Related post

NPL 2025/26 Preview — Team to watch

Form guides, top batsmen, bowlers to watch.

Match stats

Data source: ESPNcricinfo (live scrape). Last fetched from server.

// Code.gs - Google Apps Script // Deploy as Web App (Anyone, execute as "Me"). // This script fetches the ESPNcricinfo points table page and returns JSON of the table. function doGet(e) { var url = 'https://www.espncricinfo.com/series/nepal-premier-league-2025-26-1510976/points-table-standings'; try { var res = UrlFetchApp.fetch(url, {muteHttpExceptions:true, followRedirects:true, validateHttpsCertificates:true}); var code = res.getResponseCode(); var html = res.getContentText(); if (code !== 200) { return ContentService.createTextOutput(JSON.stringify({error: 'fetch_failed', code: code, bodySnippet: html.substring(0,200)})).setMimeType(ContentService.MimeType.JSON); } // Extract the first ...
block — generic approach var tableMatch = html.match(//i); if (!tableMatch) { // Try to find a div or script-based JSON that contains "points" or "pointsTable" return ContentService.createTextOutput(JSON.stringify({error:'table_not_found', hint:'No element found - page may be client rendered.'})).setMimeType(ContentService.MimeType.JSON); } var tableHtml = tableMatch[0]; // Remove newline chars for easier parsing tableHtml = tableHtml.replace(/\r?\n/g,' '); // Parse rows var rows = []; var trRegex = /]*>([\s\S]*?)<\/tr>/ig; var tdRegex = /<(?:td|th)[^>]*>([\s\S]*?)<\/(?:td|th)>/ig; var tr; while ((tr = trRegex.exec(tableHtml)) !== null) { var rowText = tr[1]; var cols = []; var td; while ((td = tdRegex.exec(rowText)) !== null) { // Strip HTML tags inside cell, trim space var cell = td[1].replace(/<[^>]+>/g,'').replace(/ /g,' ').trim(); cols.push(cell); } // ignore empty rows if (cols.length) rows.push(cols); } var result = { fetchedFrom: url, fetchedAt: new Date().toISOString(), statusCode: code, rows: rows }; return ContentService.createTextOutput(JSON.stringify(result)).setMimeType(ContentService.MimeType.JSON); } catch (err) { return ContentService.createTextOutput(JSON.stringify({error:'exception', message: err.toString()})).setMimeType(ContentService.MimeType.JSON); } }

إرسال تعليق

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.