Fix parsing of title including more than the title tag

- Fixes #195
This commit is contained in:
Goh Jia Hao 2016-05-26 18:16:02 +08:00
parent 1de9eec356
commit 5833347ad8
1 changed files with 1 additions and 1 deletions

View File

@ -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);
});
}