def get_section(self, section_id, thread_id=None, document_html=None):
if not document_html:
document_html = self.get_thread(thread_id).get("html")
if not document_html:
return None
tree = self.parse_document_html(document_html)
element = list(tree.iterfind(".//*[@id='%s']" % section_id))
if not element:
return None
return element[0]
评论列表
文章目录