adapt to new ICapMessages API
This commit is contained in:
parent
42dd9ec4e1
commit
e7c24c13c8
12 changed files with 381 additions and 249 deletions
|
|
@ -31,7 +31,7 @@ class Comment(object):
|
|||
self.reply_id = reply_id
|
||||
self.title = u''
|
||||
self.author = u''
|
||||
self.date = u''
|
||||
self.date = None
|
||||
self.body = u''
|
||||
self.score = 0
|
||||
self.comments = []
|
||||
|
|
@ -73,7 +73,8 @@ class Article(object):
|
|||
self.author = u''
|
||||
self.body = u''
|
||||
self.part2 = u''
|
||||
self.date = u''
|
||||
self.date = None
|
||||
self.url = u''
|
||||
self.comments = []
|
||||
|
||||
for div in tree.findall('div'):
|
||||
|
|
@ -116,6 +117,7 @@ class ContentPage(DLFPPage):
|
|||
def parse_div(self, div):
|
||||
if div.attrib.get('class', '') in ('newsdiv', 'centraldiv'):
|
||||
self.article = Article(self.browser, url2id(self.url), div)
|
||||
self.article.url = self.url
|
||||
if div.attrib.get('class', '') == 'articlediv':
|
||||
self.article.parse_part2(div)
|
||||
if div.attrib.get('class', '') == 'comments':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue