Skip to content

Commit

Permalink
Once again, fixing wikipedia...
Browse files Browse the repository at this point in the history
  • Loading branch information
kipe committed Mar 2, 2015
1 parent 59655c1 commit 0ac29c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyfibot/modules/module_urltitle.py
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ def get_content(url):
content = re.sub(r'\(.*?\)', '', content)
# Remove " , ", which might be left behind after cleaning up
# the brackets
content = content.replace(' , ', ', ')
content = re.sub(' +,', ', ', content)
# Remove multiple spaces
content = re.sub(' +', ' ', content)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_wikipedia.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ def test_ten():
def test_eleven():
msg = 'http://en.wikipedia.org/wiki/Edison_Arantes_do_Nascimento'
module_urltitle.init(bot)
eq_(("#channel", u"Title: Edson Arantes do Nascimento, known as Pelé and born on 21 or 23 October 1940, is a retired Brazilian professional footballer who is widely regarded to be the greatest player of all time."), module_urltitle.handle_url(bot, None, "#channel", msg, msg))
eq_(("#channel", u"Title: Edson Arantes do Nascimento, known as Pelé, is a retired Brazilian professional footballer who is widely regarded to be the greatest player of all time."), module_urltitle.handle_url(bot, None, "#channel", msg, msg))

0 comments on commit 0ac29c2

Please sign in to comment.