return streaming url when in browser for RD and PM

This commit is contained in:
TheBeastLT
2022-01-06 23:08:21 +01:00
parent e23fa9bb55
commit 5ce051b204
6 changed files with 3466 additions and 51 deletions

View File

@@ -1,6 +1,5 @@
const axios = require('axios');
const nameToImdb = require('name-to-imdb');
const googleIt = require('google-it');
const googleSr = require('google-sr');
const he = require('he');
const { cacheWrapImdbId, cacheWrapKitsuId, cacheWrapMetadata } = require('./cache');
@@ -109,8 +108,6 @@ async function getImdbId(info, type) {
reject(err || new Error('failed imdbId search'));
}
});
// }).catch(() => googleIt({ query, userAgent: getRandomUserAgent(), disableConsole: true })
// .then(results => results.length ? results : Promise.reject('No results'))
}).catch(() => googleSr(query)
.then(response => response.searchResults.length ? response.searchResults : Promise.reject('No results'))
.then(results => results