Commit 9dfd91b2 authored by Renán Sosa Guillen's avatar Renán Sosa Guillen

crawlers

parent be2e6424
...@@ -646,13 +646,12 @@ class QuotesSpider(scrapy.Spider): ...@@ -646,13 +646,12 @@ class QuotesSpider(scrapy.Spider):
author = response.xpath('//*[@class="credito-autor"]/text()').extract_first() author = response.xpath('//*[@class="credito-autor"]/text()').extract_first()
if author is None or author == '': if author is None or author == '':
author = response.xpath('//*[@class="credito-articulo"]/text()').extract_first() author = response.xpath('//*[@class="credito-articulo"]/text()').extract_first()
if author is not None and author != '':
item['author'] = author item['author'] = author
location = remove_tags(response.xpath('//p[@class="s-s"]').extract_first()) location = remove_tags(response.xpath('//p[@class="s-s"]').extract_first())
if location is not None and location != '' and len(location) <= 35: if location is not None and location != '' and len(location) <= 35:
item['location'] = location item['location'] = location
else:
item['location'] = None
for p in textLst: for p in textLst:
# text += remove_tags(p).replace('\r', '') # text += remove_tags(p).replace('\r', '')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment