Only download favicons once

merge-requests/30/head
Bob Mottram 2021-12-16 21:14:24 +00:00
parent 83b4067509
commit 22d2f49f53
1 changed files with 2 additions and 0 deletions

View File

@ -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)