Hear hear (about raw-bytes and unicode).

My point is `keyword = keyword` does absolutely nothing :-) - and if decode fails, you will get the raw bytes no matter what.

Suggestion:

`try:
  keyword = keyword.decode("utf8")
except:
  pass`