From bd57c33858588300d3f7a1d9e6b8075c76283d6e Mon Sep 17 00:00:00 2001 From: zepp Date: Wed, 23 Oct 2024 22:41:09 -0400 Subject: [PATCH] Removed import of main.py in rss_update.py The import was causing main() to run twice and download two cat images --- rss_update.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/rss_update.py b/rss_update.py index 65514f9..28ce009 100644 --- a/rss_update.py +++ b/rss_update.py @@ -1,10 +1,11 @@ from random import randint import datetime -# might as well use the datetime we made in main.py for consistency -from main import DATETIME_STR -# updates the guid given in two places with the RSS file, essential for letting readers know -# a new picture has been published +# this will change between calls due to microseconds +# better for it just to be a global +DATETIME_STR = str(datetime.datetime.today()).replace(' ', "-") +# we don't need those pesky microseconds any way +DATETIME_STR = DATETIME_STR[:-7] # refrence: https://cyber.harvard.edu/rss/rss.html#ltguidgtSubelementOfLtitemgt