Commit 1a13f0d7 authored by Mario Chirinos's avatar Mario Chirinos

heraldo leon date

parent 26555d3a
...@@ -40,7 +40,8 @@ class NoticiasSpider(scrapy.Spider): ...@@ -40,7 +40,8 @@ class NoticiasSpider(scrapy.Spider):
def parse_item(self, response): def parse_item(self, response):
# print(response.url) # print(response.url)
item = HeraldoleonItem() item = HeraldoleonItem()
item['date'] = response.xpath("//meta[@property='article:published_time']/@content").extract_first() item['date'] = self.year+"-"+self.month.zfill(2)+"-"+self.day.zfill(2)
#response.xpath("//meta[@property='article:published_time']/@content").extract_first()
# item['title'] = response.xpath("//meta[@property='og:title']/@content").extract_first() # item['title'] = response.xpath("//meta[@property='og:title']/@content").extract_first()
item['title'] = response.xpath('//h1[@class="tdb-title-text"]/text()').extract_first() item['title'] = response.xpath('//h1[@class="tdb-title-text"]/text()').extract_first()
text="" text=""
......
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