3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-24 03:33:07 +01:00

t:wqMerge branch 'master' of github.com:reality/dbot

This commit is contained in:
reality 2013-08-21 18:12:51 +00:00
commit ddc4b099ee

View File

@ -27,7 +27,7 @@ var link = function(dbot) {
page = request(link.replace('https', 'http'), function(error, response, body) {
if(!error && response.statusCode == 200) {
body = body.replace(/(\r\n|\n\r|\n)/gm, " ");
var title = body.valMatch(/<title>(.*)<\/title>/, 2);
var title = body.valMatch(/<title>(.*?)<\/title>/, 2);
if(title && title.length < 140) {
callback(ent.decode(title[1]).trim());
}