Commit 977d38d6 authored by Renán Sosa Guillen's avatar Renán Sosa Guillen

crawlers

parent e0d43f60
......@@ -35,10 +35,9 @@ class QuotesSpider(scrapy.Spider):
self.year = getattr(self, "year", None)
self.month = getattr(self, "month", None)
self.day = getattr(self, "day", None)
self.date_parser = {"january": 1, "february": 2, "march": 3, "april": 4,
"may": 5, "june": 6, "july": 7, "august": 8,
"september": 9, "october": 10, "november": 11, "december": 12}
self.date_parser = {'january': 1, 'february': 2, 'march': 3, 'april': 4,
'may': 5, 'june': 6, 'july': 7, 'august': 8,
'september': 9, 'october': 10, 'november': 11, 'december': 12}
self.baseURL = "http://www.edomexaldia.com.mx/" + self.year + "/" + self.month.zfill(2) + "/" + self.day.zfill(2)
......
......@@ -29,9 +29,9 @@ class QuotesSpider(scrapy.Spider):
month = getattr(self, "month", None)
day = getattr(self, "day", None)
self.baseURL = "https://periodicocorreo.com.mx/" + year + "/" + month.zfill(2) + "/" + day.zfill(2)
baseURL = "https://periodicocorreo.com.mx/" + year + "/" + month.zfill(2) + "/" + day.zfill(2)
yield scrapy.Request(url=self.baseURL, callback=self.parse)
yield scrapy.Request(url=baseURL, callback=self.parse)
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