fix media embedding
This commit is contained in:
parent
0486fc4893
commit
da30e00fa8
|
@ -88,7 +88,7 @@ class MhtmlParser:
|
|||
new_obj = page.new_tag('script')
|
||||
|
||||
elif any(map(fileobj.mimetype.startswith, ['audio', 'video', 'image'])):
|
||||
obj['src'] = f'data:{fileobj.mimetype};base64,{b64encode(fileobj.body)}'
|
||||
obj['src'] = f'data:{fileobj.mimetype};base64,{b64encode(fileobj.body).decode()}'
|
||||
continue
|
||||
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue