mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
[scraper] use html escape lib
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
const needle = require('needle');
|
||||
const nameToImdb = require('name-to-imdb');
|
||||
const bing = require('nodejs-bing');
|
||||
const he = require('he');
|
||||
const { cacheWrapImdbId, cacheWrapKitsuId, cacheWrapMetadata } = require('./cache');
|
||||
const { Type } = require('./types');
|
||||
|
||||
@@ -86,11 +87,7 @@ function escapeTitle(title) {
|
||||
}
|
||||
|
||||
function escapeHTML(title) {
|
||||
return title
|
||||
.replace(/'|'/g, '\'')
|
||||
.replace(/&|&/g, '&')
|
||||
.replace(/!/g, '!')
|
||||
.replace(/%/g, '%');
|
||||
return he.decode(title);
|
||||
}
|
||||
|
||||
async function getImdbId(info, type) {
|
||||
|
||||
Reference in New Issue
Block a user