initiatives.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:tipi-engine 作者: CIECODE-Madrid 项目源码 文件源码
def finishtext(self,response):
        finishitem = response.meta['fisnishitem']
        finishitem['contenido'] = []

        text = Selector(response).xpath('//div[@class="texto_completo"]').extract()[0]
        text= self.extractbyref(text=text,ref=finishitem['ref'])
        if text=="":
            try:
                text += Selector(response).xpath('//div[@class="texto_completo"]').extract()[0]
            except:
                CheckSystem.systemlog("No tiene texto para 'TEXTOFINAL' " + response.url + "ITEM URL "+finishitem['url'])

        finishitem['contenido'].append(Utils.removeHTMLtags(text))
        yield finishitem
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号