master
BrOakes 2018-10-30 21:42:14 -04:00
parent adefc7bfc5
commit 13bde703ff
2 changed files with 21 additions and 1 deletions

View File

@ -53,7 +53,7 @@ async function download() {
console.log(err); console.log(err);
} }
break; break;
} }[]
} }

View File

@ -0,0 +1,20 @@
module.exports = {
versions
}
const request = require('request');
function versions()
{
return new Promise(resolve => {
request({
uri: "https://www.python.org/ftp/python/",
}, function (error, response, body) {
const re = /"[0-9]{1,}\.[0-9]{1,}(\.[0-9]{1,})*\/"/g;
let matches = body.match(re)
matches = matches.map((value) => {
return value.slice(1,-2)
});
resolve(matches);
});
})
}