Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function researchMovie(show,context) {
// _logger.debug(show);
var showName = show['title'];
_logger.debug("Researching for : " + showName);
showName = showName.replace(/\([0-9]*\)/gmi, "").trim();
showName = showName.replace(/\((US|FR|ES)\)/gmi, "").trim();
showName = showName.replace(/['|"](s)*/gmi, "").trim();
showName= require('querystring').escape(showName);
_logger.debug("Clean Name : "+showName);
var query = (context.req.query.q) ? context.req.query.q : showName;
research( baseUrl + "/torrents/search/"+query ,reponseSearch.bind( {context: context} ),context.req.query);
}
function researchTvRage(show,context) {
s3.getSignedUrl('putObject', putParams, function (err, url) {
if (!!err) {
console.error(c.S3_GET_URLPAIR, err);
socket.emit(c.S3_GET_URLPAIR, c.ERROR);
return;
}
urlPair[c.S3_PUT_URL] = url;
urlPair[c.S3_GET_URL] = "https://aws-node-demos.s3.amazonaws.com/" + qs.escape(key);
socket.emit(c.S3_GET_URLPAIR, urlPair);
});
};
function linkify(tok, options) {
var opts = utils.merge({}, options);
if (tok && tok.content) {
opts.num = tok.seen;
var text = titleize(tok.content, opts);
var slug = utils.slugify(tok.content, opts);
slug = querystring.escape(slug);
if (opts && typeof opts.linkify === 'function') {
return opts.linkify(tok, text, slug, opts);
}
tok.content = utils.mdlink(text, '#' + slug);
}
return tok;
}
return Object.keys(obj).map(function (k) {
if (Array.isArray(obj[k])) {
return obj[k].map(function (v) {
return querystring.escape(stringifyPrimitive(k)) +
eq +
querystring.escape(stringifyPrimitive(v));
}).join(sep);
} else {
var result = querystring.escape(stringifyPrimitive(k)) +
eq +
querystring.escape(stringifyPrimitive(obj[k]));
return result;
}
}).join(sep);