Slugify deals with repeating dashes.

This commit is contained in:
DebaucheryLibrarian 2026-01-10 03:00:52 +01:00
parent 7ad2051dd7
commit 8c84839bdd
2 changed files with 1 additions and 3 deletions

View File

@ -49,8 +49,6 @@ function scrapeScene({ query }, { url, entity }) {
release.entryId = getEntryId(url);
release.title = query.content(['#media-holder .title', '.content-holder h1', '#scene h1', 'h2.titular', 'title'])?.replace(/\s+-$/, '');
console.log(release);
release.date = query.date('#sceneInfo .date, #trailer-data .date', 'YYYY-MM-DD');
release.duration = query.duration('#sceneInfo .data-others, #trailer-data', /\d+:\d+/);

View File

@ -66,7 +66,7 @@ function slugify(strings, delimiter = '-', {
: string;
const normalized = casedString
.replace(/[_-]/g, ' ')
.replace(/[_-]+/g, ' ')
.split('')
.map((char) => {
if (char === ' ') {