mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
[scraper] fix null imdbid search result
This commit is contained in:
@@ -113,7 +113,7 @@ async function getImdbId(info, type) {
|
|||||||
.find(result => result.includes('imdb.com/title/')))
|
.find(result => result.includes('imdb.com/title/')))
|
||||||
.then(result => result && result.match(/imdb\.com\/title\/(tt\d+)/))
|
.then(result => result && result.match(/imdb\.com\/title\/(tt\d+)/))
|
||||||
.then(match => match && match[1])))
|
.then(match => match && match[1])))
|
||||||
.then(imdbId => 'tt' + imdbId.replace(/tt0*([1-9][0-9]*)$/, '$1').padStart(7, '0'));
|
.then(imdbId => imdbId && 'tt' + imdbId.replace(/tt0*([1-9][0-9]*)$/, '$1').padStart(7, '0'));
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getKitsuId(info) {
|
async function getKitsuId(info) {
|
||||||
|
|||||||
Reference in New Issue
Block a user