versions
parent
adefc7bfc5
commit
13bde703ff
|
|
@ -53,7 +53,7 @@ async function download() {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
}
|
||||||
Reference in New Issue