Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove default dates set from colombia spider #424

Merged
merged 2 commits into from
Jun 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions kingfisher_scrapy/spiders/colombia.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import datetime
import logging
import time
from json import JSONDecodeError
Expand Down Expand Up @@ -38,12 +37,8 @@ def start_requests(self):
if hasattr(self, 'year'):
base_url += f'/page/{int(self.year)}'
if self.from_date or self.until_date:
from_date = self.default_from_date
until_date = datetime.datetime.today().strftime(self.date_format)
if self.from_date:
from_date = self.from_date.strftime(self.date_format)
if self.until_date:
until_date = self.until_date.strftime(self.date_format)
from_date = self.from_date.strftime(self.date_format)
until_date = self.until_date.strftime(self.date_format)
base_url += f'/dates/{from_date}/{until_date}'

base_url += '?page={}'
Expand Down