impulso estado de mexico

parent df362f1a
...@@ -123,4 +123,5 @@ class NoticiasSpider(scrapy.Spider): ...@@ -123,4 +123,5 @@ class NoticiasSpider(scrapy.Spider):
'url': "https://"+self.allowed_domains[0]+ uri, 'url': "https://"+self.allowed_domains[0]+ uri,
'author': author_name 'author': author_name
} }
print(item["title"])
yield item yield item
This diff is collapsed.
...@@ -35,7 +35,7 @@ class NoticiasSpider(scrapy.Spider): ...@@ -35,7 +35,7 @@ class NoticiasSpider(scrapy.Spider):
self.day = day.zfill(2) if day else None self.day = day.zfill(2) if day else None
if self.year and self.month and self.day: if self.year and self.month and self.day:
self.start_urls = [ self.start_urls = [
f"https://www.capitaledomex.com.mx/wp-json/wp/v2/posts?after={self.year}-{self.month}-{self.day}T00:00:00&before={self.year}-{self.month}-{self.day}T23:59:59&per_page=100" f"{allowed_domains[0]}/wp-json/wp/v2/posts?after={self.year}-{self.month}-{self.day}T00:00:00&before={self.year}-{self.month}-{self.day}T23:59:59&per_page=100"
] ]
def parse(self, response): def parse(self, response):
......
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