Refactored Aziani scraper. Improved actor profile update logic.

This commit is contained in:
DebaucheryLibrarian
2024-11-24 06:10:21 +01:00
parent 909dc36569
commit fbfd52e831
7 changed files with 354 additions and 163 deletions

View File

@@ -87,15 +87,24 @@ function convertApi(input, fromOrTo, to) {
}
function maleFeetUsToEu(input) {
if (!input) {
return null;
}
const size = Number(input.toString().match(/\d+(\.\d+)?/)?.[0]);
return Math.round((1.27 * size + 29.94) / 0.5) * 0.5; // round to nearest half
}
function femaleFeetUsToEu(input) {
if (!input) {
return null;
}
const size = Number(input.toString().match(/\d+(\.\d+)?/)?.[0]);
return Math.round((1.27 * size + 28.67) / 0.5) * 0.5; // round to nearest half
// return Math.round((1.27 * size + 28.67) / 0.5) * 0.5; // round to nearest half
return Math.round(1.27 * size + 28.67);
}
module.exports = {