Properly deal with single line comments in tfw module

master
mutantmonkey 2010-12-06 17:08:43 -05:00
parent 44354a5908
commit c1a847c8a5
1 changed files with 4 additions and 1 deletions

View File

@ -26,7 +26,10 @@ def tfw(phenny, input):
# parse comment (broken by <br />, so we have do it this way) # parse comment (broken by <br />, so we have do it this way)
comments = main[0].xpath('text()') comments = main[0].xpath('text()')
if len(comments) > 2:
comment = "%s %s" % (comments[1], comments[2]) comment = "%s %s" % (comments[1], comments[2])
else :
comment = comments[1]
# remark is in its own div, so we have it easy # remark is in its own div, so we have it easy
remark = weather.get_element_by_id('remark').text_content() remark = weather.get_element_by_id('remark').text_content()