Sandbox
Jump to navigation
Jump to search
const axios = require('axios')
const https = require('https');
const req = axios.create({
httpsAgent: new https.Agent({
rejectUnauthorized: false
})
});
req.get('https://www.nodeka.com')
.then((response) => {
const strings = response.data.split("\n")
const playerRegex = /(\d+)<\/strong><\/font>/
strings.forEach((string) => {
const found = string.match(playerRegex);
if (found) {
console.log("found", found[1]); // eslint-disable-line
}
})
})
.catch((error) => {
console.error(error)
});