Properly deal with single line comments in tfw module
parent
44354a5908
commit
c1a847c8a5
|
@ -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()
|
||||||
|
|
Loading…
Reference in New Issue