diff --git a/src/infer/inferTitle.js b/src/infer/inferTitle.js index 580ab6c..9db73da 100644 --- a/src/infer/inferTitle.js +++ b/src/infer/inferTitle.js @@ -17,7 +17,7 @@ function inferTitle(url, callback) { } const $ = cheerio.load(body); - const pageTitle = $('title').text().replace(/\//g, ''); + const pageTitle = $('title').first().text().replace(/\//g, ''); callback(null, pageTitle); }); }