Skip to content
Snippets Groups Projects
Commit 7c58973f authored by Nils Breyer's avatar Nils Breyer
Browse files

fix

parent 9cac3624
No related branches found
No related tags found
No related merge requests found
......@@ -80,7 +80,8 @@ class TrafikverketDailyCrawler (crawler.PeriodicCrawler):
def crawl(self):
todayMidnight = datetime.datetime.now().replace(hour=0, minute=0, second=0, microsecond=0)
yesterdayMidnight = todayMidnight - datetime.timedelta(days=1)
filename = os.path.join(self.path, f"{self.objecttype}_{self.identifier}_{yesterdayMidnight.strftime("%Y-%m-%d")}.csv")
date_str = yesterdayMidnight.strftime("%Y-%m-%d")
filename = os.path.join(self.path, f"{self.objecttype}_{self.identifier}_{date_str}.csv")
if not os.path.exists(filename):
if self.DEBUG:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment