mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
[scraper] do not escape hyphen when searching for id
This commit is contained in:
@@ -83,8 +83,8 @@ function escapeTitle(title) {
|
||||
.normalize('NFKD') // normalize non-ASCII characters
|
||||
.replace(/[\u0300-\u036F]/g, '')
|
||||
.replace(/&/g, 'and')
|
||||
.replace(/[;, ~\-]+/g, ' ') // replace dots, commas or underscores with spaces
|
||||
.replace(/[^\w ()+#@!']+/g, '') // remove all non-alphanumeric chars
|
||||
.replace(/[;, ~]+/g, ' ') // replace dots, commas or underscores with spaces
|
||||
.replace(/[^\w \-()+#@!']+/g, '') // remove all non-alphanumeric chars
|
||||
.trim();
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ async function getImdbId(info, type) {
|
||||
|
||||
async function getKitsuId(info) {
|
||||
const title = escapeTitle(info.title);
|
||||
const year = info.year ? ` ${info.year} ` : '';
|
||||
const year = info.year ? ` ${info.year}` : '';
|
||||
const season = info.season > 1 ? ` S${info.season}` : '';
|
||||
const query = `${title}${year}${season}`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user