def extract_detail_url(self, html): """ 分析列表页面,解析出detail url :param content: :return:list of detail url """ hrefs = list() for a in PQ(html)('.questions_detail_con>dl>dt>a'): href = PQ(a).attr('href').strip() if href.startswith('/'): href = self.BASE_URL + href hrefs.append(href) return hrefs