diff options
author | François Schmidts <francois.schmidts@gmail.com> | 2015-07-31 13:21:33 +0200 |
---|---|---|
committer | François Schmidts <francois.schmidts@gmail.com> | 2015-07-31 13:21:33 +0200 |
commit | 60052ffca30ec33b79eb36b0fe4d49b338f73ca1 (patch) | |
tree | eeb7c892cb6e5e8c75248762e0cd62a0a1758653 /pyaggr3g470r/lib/utils.py | |
parent | redoing the etag matching mechanism (diff) | |
download | newspipe-60052ffca30ec33b79eb36b0fe4d49b338f73ca1.tar.gz newspipe-60052ffca30ec33b79eb36b0fe4d49b338f73ca1.tar.bz2 newspipe-60052ffca30ec33b79eb36b0fe4d49b338f73ca1.zip |
ensuring the icon isn't empty and redoing a bit of logging
Diffstat (limited to 'pyaggr3g470r/lib/utils.py')
-rw-r--r-- | pyaggr3g470r/lib/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pyaggr3g470r/lib/utils.py b/pyaggr3g470r/lib/utils.py index a51b6c3e..b937b5a9 100644 --- a/pyaggr3g470r/lib/utils.py +++ b/pyaggr3g470r/lib/utils.py @@ -48,7 +48,7 @@ def try_get_b64icon(url, *splits): response = requests.get(rb_url, verify=False, timeout=10) # if html in content-type, we assume it's a fancy 404 page content_type = response.headers.get('content-type', '') - if response.ok and 'html' not in content_type: + if response.ok and 'html' not in content_type and response.content: return content_type + ( '\n%s' % base64.b64encode(response.content).decode('utf8')) return None |