do not crash on 'like' messages
This commit is contained in:
parent
54d9efd05a
commit
535f5fc0a1
1 changed files with 4 additions and 1 deletions
|
|
@ -64,7 +64,10 @@ class MessagesPage(BasePage):
|
|||
mails['member']['pseudo'] = 'Unknown'
|
||||
|
||||
for li in reversed(self.document.xpath('//ul[@id="thread"]//li[contains(@id, "message_")]')):
|
||||
txt = self.parser.tostring(li.xpath('.//div[@class="message_body"]')[0])
|
||||
try:
|
||||
txt = self.parser.tostring(li.xpath('.//div[@class="message_body"]')[0])
|
||||
except IndexError:
|
||||
continue # 'Match' message
|
||||
txt = html2text(txt).strip()
|
||||
|
||||
m = re.search(r'(\d+), ', li.xpath('.//span[@class="timestamp"]//script')[0].text)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue