mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
[scraper] fails google-it on empty results
This commit is contained in:
@@ -111,6 +111,7 @@ async function getImdbId(info, type) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}).catch(() => googleIt({ query, userAgent: getRandomUserAgent(), disableConsole: true })
|
}).catch(() => googleIt({ query, userAgent: getRandomUserAgent(), disableConsole: true })
|
||||||
|
.then(results => results.length ? results : Promise.reject('No results'))
|
||||||
.catch(() => bing.web(query))
|
.catch(() => bing.web(query))
|
||||||
.then(results => results
|
.then(results => results
|
||||||
.map(result => result.link)
|
.map(result => result.link)
|
||||||
|
|||||||
Reference in New Issue
Block a user