Added American Pornstar. Improved Jules Jordan scraper to accomodate for American Pornstar. Changed entity logo mogrify settings to ensure both minimum height and width.

This commit is contained in:
DebaucheryLibrarian
2020-09-05 01:56:54 +02:00
parent 3ddba0816e
commit e90bb63a8f
2508 changed files with 139 additions and 34 deletions

View File

@@ -40,6 +40,10 @@ function formatDate(dateValue, format, inputFormat) {
}
function prefixUrl(urlValue, origin, protocol = 'https') {
if (/^http/.test(urlValue)) {
return urlValue;
}
if (protocol && /^\/\//.test(urlValue)) {
return `${protocol}:${urlValue}`;
}
@@ -48,7 +52,7 @@ function prefixUrl(urlValue, origin, protocol = 'https') {
return `${origin}${urlValue}`;
}
return urlValue;
return `${origin}/${urlValue}`;
}
function q(context, selector, attrArg, applyTrim = true) {

View File

@@ -39,13 +39,18 @@ const substitutes = {
function slugify(string, delimiter = '-', {
encode = false,
removeAccents = true,
removePunctuation = false,
limit = 1000,
} = {}) {
if (!string || typeof string !== 'string') {
return string;
}
const slugComponents = string.trim().toLowerCase().match(/[A-Za-zÀ-ÖØ-öø-ÿ0-9]+/g);
const slugComponents = string
.trim()
.toLowerCase()
.replace(removePunctuation && /[.,:;'"]/g, '')
.match(/[A-Za-zÀ-ÖØ-öø-ÿ0-9]+/g);
if (!slugComponents) {
return '';