From 22d2f49f53b575de9009375a8864fe2bc2d187c0 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 16 Dec 2021 21:14:24 +0000 Subject: [PATCH] Only download favicons once --- newswire.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/newswire.py b/newswire.py index a16482270..b3a65fd44 100644 --- a/newswire.py +++ b/newswire.py @@ -158,6 +158,8 @@ def _downloadNewswireFeedFavicon(session, baseDir: str, os.mkdir(baseDir + '/favicons') linkFilename = url.replace('/', '#') imageFilename = baseDir + '/favicons/' + linkFilename + if os.path.isfile(imageFilename): + return True try: with open(imageFilename, 'wb+') as fp: fp.write(imageData)