mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 21:45:02 +03:00
[embed] get rid of empty src in iframe
This commit is contained in:
parent
d6f9fefe42
commit
ad08f82a1a
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user