From d7b2c28c968dd0f43ae9f23148a852c88130ebf5 Mon Sep 17 00:00:00 2001 From: Michiel Scholten Date: Fri, 23 Mar 2018 13:17:21 +0100 Subject: [PATCH] Case where no icon is supplied --- digimarks.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/digimarks.py b/digimarks.py index 7d8bcff..6c6adfd 100644 --- a/digimarks.py +++ b/digimarks.py @@ -345,7 +345,9 @@ class Bookmark(BaseModel): # Debug for the moment print(domain) print(response.headers) - print(response.headers['X-RateLimit-requests-Remaining']) + if response.headers['Content-Length'] == '0': + # No favicon found, likely + print('Skipping this favicon, needs fallback') # Default to 'image/png' fileextension = '.png' if response.headers['content-type'] == 'image/jpeg':