Refactored Aziani scraper. Improved actor profile update logic.
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user