animal politico

parent 5e8eddfd
...@@ -84,8 +84,6 @@ class NoticiasSpider(scrapy.Spider): ...@@ -84,8 +84,6 @@ class NoticiasSpider(scrapy.Spider):
'Content-Type': 'application/json' 'Content-Type': 'application/json'
} }
print(payload)
yield scrapy.Request( yield scrapy.Request(
url=url, url=url,
method="POST", method="POST",
...@@ -112,6 +110,6 @@ class NoticiasSpider(scrapy.Spider): ...@@ -112,6 +110,6 @@ class NoticiasSpider(scrapy.Spider):
item['title'] = remove_tags(node.get("title")) item['title'] = remove_tags(node.get("title"))
item['topic'] = remove_tags(node.get("contentTypeName")) item['topic'] = remove_tags(node.get("contentTypeName"))
item['text'] = remove_tags(node.get("contentRendered")) item['text'] = remove_tags(node.get("contentRendered"))
item['url'] = self.start_urls[0] + node.get("uri") item['url'] = "https://"+self.allowed_domains[0]+"/" + node.get("uri")
item['author'] = node.get("author", {}).get("node", {}).get("name") item['author'] = node.get("author", {}).get("node", {}).get("name")
yield item yield item
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