@property<EOL><INDENT>def answers(self):<DEDENT>
from .author import Author<EOL>from .answer import Answer<EOL>self._make_soup()<EOL>if self._url.endswith('<STR_LIT>'):<EOL><INDENT>pager = self.soup.find('<STR_LIT>', class_='<STR_LIT>')<EOL>if pager is None:<EOL><INDENT>max_page = <NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>max_page = int(pager.find_all('<STR_LIT>')[-<NUM_LIT:2>].a.text)<EOL><DEDENT>for page in range(<NUM_LIT:1>, max_page + <NUM_LIT:1>):<EOL><INDENT>if page == <NUM_LIT:1>:<EOL><INDENT>soup = self.soup<EOL><DEDENT>else:<EOL><INDENT>url = self._url + '<STR_LIT>' % page<EOL>soup = BeautifulSoup(self._session.get(url).content)<EOL><DEDENT>error_answers = soup.find_all('<STR_LIT>', id='<STR_LIT>')<EOL>for each in error_answers:<EOL><INDENT>each['<STR_LIT:class>'] = '<STR_LIT>'<EOL><DEDENT>answers_wrap = soup.find('<STR_LIT>', id='<STR_LIT>')<EOL>authors = answers_wrap.find_all(<EOL>'<STR_LIT>', class_='<STR_LIT>')<EOL>urls = answers_wrap.find_all('<STR_LIT:a>', class_='<STR_LIT>')<EOL>up_num = answers_wrap.find_all('<STR_LIT>',<EOL>class_='<STR_LIT>')<EOL>contents = answers_wrap.find_all(<EOL>'<STR_LIT>', class_='<STR_LIT>')<EOL>assert len(authors) == len(urls) == len(up_num) == len(<EOL>contents)<EOL>for author, url, up_num, content inzip(authors, urls, up_num, contents):<EOL><INDENT>a_url, name, motto, photo = parser_author_from_tag(author)<EOL>author_obj = Author(a_url, name, motto, photo_url=photo,<EOL>session=self._session)<EOL>url = Zhihu_URL + url['<STR_LIT>']<EOL>up_num = int(up_num['<STR_LIT>'])<EOL>content = answer_content_process(content)<EOL>yield Answer(url, self, author_obj, up_num, content,<EOL>session=self._session)<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>pagesize = <NUM_LIT:10><EOL>new_header = dict(Default_Header)<EOL>new_header['<STR_LIT>'] = self.url<EOL>params = {"<STR_LIT>": self.id,<EOL>'<STR_LIT>': pagesize,<EOL>'<STR_LIT>': <NUM_LIT:0>}<EOL>data = {'<STR_LIT>': self.xsrf,<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT>'}<EOL>for i in range(<NUM_LIT:0>, (self.answer_num - <NUM_LIT:1>) // pagesize + <NUM_LIT:1>):<EOL><INDENT>if i == <NUM_LIT:0>:<EOL><INDENT>error_answers = self.soup.find_all('<STR_LIT>',<EOL>id='<STR_LIT>')<EOL>for each in error_answers:<EOL><INDENT>each['<STR_LIT:class>'] = '<STR_LIT>'<EOL><DEDENT>answers_wrap = self.soup.find('<STR_LIT>',<EOL>id='<STR_LIT>')<EOL>authors = answers_wrap.find_all(<EOL>'<STR_LIT>', class_='<STR_LIT>')<EOL>urls = answers_wrap.find_all('<STR_LIT:a>', class_='<STR_LIT>')<EOL>up_num = answers_wrap.find_all('<STR_LIT>',<EOL>class_='<STR_LIT>')<EOL>contents = answers_wrap.find_all(<EOL>'<STR_LIT>', class_='<STR_LIT>')<EOL>assert len(authors) == len(urls) == len(up_num) == len(<EOL>contents)<EOL>for author, url, up_num, content inzip(authors, urls, up_num, contents):<EOL><INDENT>a_url, name, motto, photo = parser_author_from_tag(<EOL>author)<EOL>author_obj = Author(a_url, name, motto, photo_url=photo,<EOL>session=self._session)<EOL>url = Zhihu_URL + url['<STR_LIT>']<EOL>up_num = int(up_num['<STR_LIT>'])<EOL>content = answer_content_process(content)<EOL>yield Answer(url, self, author_obj, up_num, content,<EOL>session=self._session)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>params['<STR_LIT>'] = i * pagesize<EOL>data['<STR_LIT>'] = json.dumps(params)<EOL>r = self._session.post(Question_Get_More_Answer_URL,<EOL>data=data,<EOL>headers=new_header)<EOL>answer_list = r.json()['<STR_LIT>']<EOL>for answer_html in answer_list:<EOL><INDENT>yield self._parse_answer_html(answer_html)<EOL><DEDENT><DEDENT><DEDENT><DEDENT>
获取问题的所有答案.

        :return: 问题的所有答案，返回生成器
        :rtype: Answer.Iterable