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
评论列表
文章目录