limit results, improve age display
This commit is contained in:
@ -45,6 +45,11 @@ async function getMovieClassification(movieUrl) {
|
||||
const label = $(el).find('span.vh').text().trim();
|
||||
if (label) marks.push(label);
|
||||
});
|
||||
const normalizedMarks = marks.map(m => {
|
||||
// Extract first number found, else null
|
||||
const n = parseInt((m + '').replace(/\D/g, ''), 10);
|
||||
return isNaN(n) ? null : n;
|
||||
}).filter(x => x !== null);
|
||||
const details = [];
|
||||
$('.c-classificatie__item').each((_, el) => {
|
||||
const type = $(el).find('svg use').first().attr('xlink:href') || '';
|
||||
@ -61,6 +66,7 @@ async function getMovieClassification(movieUrl) {
|
||||
genres,
|
||||
img,
|
||||
marks,
|
||||
normalizedMarks,
|
||||
details,
|
||||
summary
|
||||
};
|
||||
|
Reference in New Issue
Block a user