mirror of
https://github.com/TheBeastLT/torrentio-scraper.git
synced 2026-04-21 15:11:56 +00:00
[scraper] adds year to kitsuId search query
This commit is contained in:
parent
7535a4ea55
commit
b5c58c92f0
1 changed files with 2 additions and 1 deletions
|
|
@ -104,8 +104,9 @@ async function getImdbId(info, type) {
|
||||||
|
|
||||||
async function getKitsuId(info) {
|
async function getKitsuId(info) {
|
||||||
const title = escapeTitle(info.title);
|
const title = escapeTitle(info.title);
|
||||||
|
const year = info.year ? ` ${info.year} ` : '';
|
||||||
const season = info.season > 1 ? ` S${info.season}` : '';
|
const season = info.season > 1 ? ` S${info.season}` : '';
|
||||||
const query = `${title}${season}`;
|
const query = `${title}${year}${season}`;
|
||||||
|
|
||||||
return cacheWrapKitsuId(query,
|
return cacheWrapKitsuId(query,
|
||||||
() => needle('get', `${KITSU_URL}/catalog/series/kitsu-anime-list/search=${query}.json`, { open_timeout: 60000 })
|
() => needle('get', `${KITSU_URL}/catalog/series/kitsu-anime-list/search=${query}.json`, { open_timeout: 60000 })
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue