Simplify code and change output string to unicode

I wish I had Python3, the whole unicode/normal string thing sucks.
This commit is contained in:
Luke Rogers 2013-09-19 10:38:42 +12:00
parent 45330ddfb4
commit f98774032f

View file

@ -48,6 +48,4 @@ def google(inp):
content = http.html.fromstring(content).text_content()
content = text.truncate_str(content, 150)
out = '{} -- \x02{}\x02: "{}"'.format(result['unescapedUrl'], title, content)
return out
return u'{} -- \x02{}\x02: "{}"'.format(result['unescapedUrl'], title, content)