示例#1
0
文件: pages.py 项目: guix77/weboob
 def get_thread(self, id):
     thr = Thread(id=id)
     self.fill_thread(thr)
     thr.date = thr.root.date
     thr.title = thr.root.title
     thr.url = thr.root.url
     return thr
示例#2
0
文件: module.py 项目: laurentb/weboob
 def _build_thread(self, data):
     thread = Thread("%s.%s" % (data["commentable_id"], data["id"]))
     thread.title = data["title"]
     thread.date = dateutil.parser.parse(data["created_at"])
     thread.url = self.browser.thread.build(course=self.browser.course, topic=data["commentable_id"], id=data["id"])
     thread.root = self._build_message(data, thread)
     thread._messages_count = data["comments_count"] + 1
     return thread
示例#3
0
 def _build_thread(self, data):
     thread = Thread("%s.%s" % (data["commentable_id"], data["id"]))
     thread.title = data["title"]
     thread.date = dateutil.parser.parse(data["created_at"])
     thread.url = self.browser.thread.build(course=self.browser.course, topic=data["commentable_id"], id=data["id"])
     thread.root = self._build_message(data, thread)
     thread._messages_count = data["comments_count"] + 1
     return thread