From b2c23d04463aef20bfa233e30788ff422fd93096 Mon Sep 17 00:00:00 2001 From: lub Date: Thu, 20 Oct 2022 01:19:56 +0200 Subject: [PATCH] fix old_cache check --- scrape.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scrape.py b/scrape.py index 05da886..1480762 100644 --- a/scrape.py +++ b/scrape.py @@ -2,6 +2,7 @@ from os import environ import asyncio import re +from copy import deepcopy from datetime import datetime, timedelta from random import randrange @@ -146,7 +147,7 @@ async def main(): cache[category] = [] if hasattr(cache_state, 'content') and 'url_list' in cache_state.content: cache[category] += cache_state.content['url_list'] - old_cache = cache + old_cache = deepcopy(cache) # scrape all blog posts and process them blog = get_blog()