From 345d2599a5ad4872857355449aa79a96e67b397f Mon Sep 17 00:00:00 2001 From: Vincent Ardisson Date: Thu, 9 Nov 2017 11:08:45 +0100 Subject: [PATCH] [bforbank] login images are now inline --- modules/bforbank/pages.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/bforbank/pages.py b/modules/bforbank/pages.py index ed4fbf7a15..9221841211 100644 --- a/modules/bforbank/pages.py +++ b/modules/bforbank/pages.py @@ -22,6 +22,7 @@ from collections import OrderedDict import re from io import BytesIO +from base64 import b64decode from PIL import Image @@ -55,7 +56,7 @@ def __init__(self, basepage): self.fingerprints = [] for htmlimg in self.basepage.doc.xpath('.//div[@class="m-btn-pin"]//img'): url = htmlimg.attrib.get("src") - imgfile = BytesIO(basepage.browser.open(url).content) + imgfile = BytesIO(b64decode(re.match('data:image/png;base64,(.*)', url).group(1))) img = Image.open(imgfile) matrix = img.load() s = "" -- GitLab