Règle partagée front/back : flag natif, verticale stricte (ratio ≤ 0.8, ≤ 90 s), verticale sans durée jamais short, repli durée (70 YT / 75 autres). Dimensions alimentées par Dailymotion/Odysee/PeerTube, flag maison Rumble supprimé, condition innertube morte simplifiée. Shorts : langues utilisateur (UI + transcripts) via relevanceLanguage/languageOneOf/Twitch language, son activé par défaut.
This commit is contained in:
+12
-12
@@ -221,18 +221,18 @@ function parseSearchHtml(html, { limit = 50 } = {}) {
|
||||
}
|
||||
const viewsText = $el.find('.video-item--views').first().text().trim();
|
||||
const views = Number(String(viewsText).replace(/[^\d]/g, '')) || undefined;
|
||||
items.push({
|
||||
title: title || url,
|
||||
id,
|
||||
url,
|
||||
thumbnail: normalizeThumb(rawThumbnail),
|
||||
uploaderName: uploaderName || undefined,
|
||||
views,
|
||||
type: 'video',
|
||||
duration: durationSeconds,
|
||||
// Pas de flag natif côté Rumble : durée courte (1..75 s) ⇒ Short probable.
|
||||
isShort: typeof durationSeconds === 'number' && durationSeconds > 0 && durationSeconds <= 75,
|
||||
});
|
||||
items.push({
|
||||
title: title || url,
|
||||
id,
|
||||
url,
|
||||
thumbnail: normalizeThumb(rawThumbnail),
|
||||
uploaderName: uploaderName || undefined,
|
||||
views,
|
||||
type: 'video',
|
||||
duration: durationSeconds,
|
||||
// Pas de flag maison ici : le filtre central (isShortItem,
|
||||
// durée ≤75 s) tranche. Le scraper HTML n'expose pas de dimensions.
|
||||
});
|
||||
});
|
||||
return items;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user