This commit is contained in:
Kovid Goyal 2014-12-27 10:20:06 +05:30
parent 9bb34dffa3
commit 5e1d6d1618

View File

@ -19,7 +19,7 @@ class DataURL(object):
if not hasattr(root, 'xpath'): if not hasattr(root, 'xpath'):
continue continue
for img in attr_path(root): for img in attr_path(root):
raw = img.get('src') raw = img.get('src', '')
if not raw.startswith('data:'): if not raw.startswith('data:'):
continue continue
header, data = raw.partition(',')[0::2] header, data = raw.partition(',')[0::2]