Commit da572630 by benjaoming

python3 compat bug

parent 1574c00f
...@@ -89,7 +89,7 @@ def get_content_snippet(content, keyword, max_words=30): ...@@ -89,7 +89,7 @@ def get_content_snippet(content, keyword, max_words=30):
m.group("before")).replace( m.group("before")).replace(
"\n", "\n",
" ").split(" "))) " ").split(" ")))
before_words = words[-max_words / 2:] before_words = words[-max_words // 2:]
words = list(filter( words = list(filter(
lambda x: x != "", lambda x: x != "",
striptags( striptags(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment