Web: normalize whitespace in titles

Sample link: http://googleblog.blogspot.com/2015/08/android-wear-now-works-with-iphones.html
Before: <bot> 'Title: \nOfficial Google Blog: Android Wear now works with iPhones\n (at googleblog.blogspot.com)'
After: <bot> Title: Official Google Blog: Android Wear now works with iPhones (at googleblog.blogspot.com)
This commit is contained in:
James Lu 2015-12-29 17:12:26 -08:00
parent 4b1c766b42
commit e2dedcc5a4

View File

@ -145,7 +145,7 @@ class Web(callbacks.PluginRegexp):
return None
parser.feed(text)
parser.close()
title = ''.join(parser.data).strip()
title = utils.str.normalizeWhitespace(''.join(parser.data).strip())
if title:
return (target, title)
elif raiseErrors: