Commit 345d2599 authored by Vincent Ardisson's avatar Vincent Ardisson Committed by Romain Bignon

[bforbank] login images are now inline

parent 3e69d5cc
......@@ -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 = ""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment