We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9c150d3 commit 9f1a028Copy full SHA for 9f1a028
backend/scraping/instagram_feed.py
@@ -438,6 +438,10 @@ def check_post_limit():
438
first_occurrence = event_data.get("occurrences")[0]
439
dtstart_utc = first_occurrence.get("start_utc")
440
now = timezone.now()
441
+ if isinstance(dtstart_utc, str):
442
+ dtstart_utc = parser.parse(dtstart_utc)
443
+ if timezone.is_naive(dtstart_utc):
444
+ dtstart_utc = timezone.make_aware(dtstart_utc)
445
if dtstart_utc and dtstart_utc < now:
446
logger.info(
447
f"[{post.shortcode}] [{post.owner_username}] Skipping event '{event_data.get('title')}' with past date {dtstart_utc}"
0 commit comments