[scraper] updates scrapers and unique index
This commit is contained in:
@@ -96,10 +96,11 @@ async function getImdbId(info, type) {
|
||||
});
|
||||
}).catch(() => bing.web(`${name} ${year || ''} ${type} imdb`)
|
||||
.then(results => results
|
||||
.map((result) => result.link)
|
||||
.map(result => result.link)
|
||||
.find(result => result.includes('imdb.com/title/')))
|
||||
.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'));
|
||||
}
|
||||
|
||||
async function getKitsuId(info) {
|
||||
|
||||
Reference in New Issue
Block a user