bedetheque-scraper
Version:
NodeJS script to scrap the entire database of dbgest.com / bedetheque.com (approx. 260.000+ albums)
18 lines (17 loc) • 513 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var Utils = /** @class */ (function () {
function Utils() {
}
Utils.setTimeoutPromise = function (ms) {
return new Promise(function (resolve) {
setTimeout(function () { resolve(); }, ms);
});
};
Utils.urlToSerieID = function (url) {
var match = url.match(/serie-([0-9]+)-/);
return match ? parseInt(match[1], 10) : 0;
};
return Utils;
}());
exports.Utils = Utils;