can use okc with monboob
This commit is contained in:
parent
a40643bf40
commit
db2494d3ad
3 changed files with 38 additions and 54 deletions
|
|
@ -43,6 +43,7 @@ class ThreadPage(BasePage):
|
|||
threads.append({
|
||||
u'username' : unicode(elem.getchildren()[0].get('href').split('/')[-1].split('?')[0]),
|
||||
u'id' : unicode(elem.get('id', '').split('_')[1]),
|
||||
u'date' : unicode(elem.find('.//p[@class="date"]').text)
|
||||
})
|
||||
|
||||
return threads
|
||||
|
|
@ -57,7 +58,10 @@ class MessagesPage(BasePage):
|
|||
'messages' : [],
|
||||
}
|
||||
|
||||
mails['member']['pseudo'] = self.document.xpath('//li[starts-with(@id, "usr_")]')[0].attrib['id'].split('_', 1)[-1]
|
||||
try:
|
||||
mails['member']['pseudo'] = self.document.xpath('//li[starts-with(@id, "usr_")]')[0].attrib['id'].split('_', 1)[-1]
|
||||
except IndexError:
|
||||
mails['member']['pseudo'] = 'Unknown'
|
||||
|
||||
for li_msg in reversed(ul_item.getchildren()):
|
||||
div = li_msg.getchildren()[1]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue