Commit 5cbe5d38 authored by Mario Chirinos's avatar Mario Chirinos

el financiero date

parent fefd97bb
...@@ -47,7 +47,7 @@ class NoticiasSpider(scrapy.Spider): ...@@ -47,7 +47,7 @@ class NoticiasSpider(scrapy.Spider):
text+=tt text+=tt
# #
item['title'] = response.xpath('//meta[@property="og:title"]/@content').extract_first() item['title'] = response.xpath('//meta[@property="og:title"]/@content').extract_first()
item['date'] = response.xpath('//time/@datetime').extract_first() item['date'] = response.xpath('//time/@datetime').extract_first() if not None else self.date
item['topic'] = response.xpath('//meta[@name="keywords"]/@content').extract() item['topic'] = response.xpath('//meta[@name="keywords"]/@content').extract()
# item['author'] = response.xpath('//span[contains(@class, "sc__author--name")]/text()').extract_first()[0:-2].strip() # item['author'] = response.xpath('//span[contains(@class, "sc__author--name")]/text()').extract_first()[0:-2].strip()
......
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