[embed] get rid of empty src in iframe

This commit is contained in:
Mort Yao 2019-04-28 19:02:45 +02:00
parent d6f9fefe42
commit ad08f82a1a
No known key found for this signature in database
GPG Key ID: 07DA00CB78203251

View File

@ -133,7 +133,7 @@ def embed_download(url, output_dir = '.', merge = True, info_only = False, **kwa
r = 1
else:
r += 1
iframes = matchall(content, [r'<iframe.+?src=(?:\"|\')(.+?)(?:\"|\')'])
iframes = matchall(content, [r'<iframe.+?src=(?:\"|\')(.*?)(?:\"|\')'])
for iframe in iframes:
if not iframe.startswith('http'):
src = urllib.parse.urljoin(url, iframe)