mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-10 09:07:58 +01:00
[generic] Do not download images as videos by accident
This commit is contained in:
parent
3f514a353e
commit
1cb6dcdbbe
1 changed files with 2 additions and 1 deletions
|
@ -830,7 +830,8 @@ def _playlist_from_matches(matches, getter, ie=None):
|
|||
if m_video_type is not None:
|
||||
def check_video(vurl):
|
||||
vpath = compat_urlparse.urlparse(vurl).path
|
||||
return '.' in vpath and not vpath.endswith('.swf')
|
||||
vext = determine_ext(vpath)
|
||||
return '.' in vpath and vext not in ('swf', 'png', 'jpg')
|
||||
found = list(filter(
|
||||
check_video,
|
||||
re.findall(r'<meta.*?property="og:video".*?content="(.*?)"', webpage)))
|
||||
|
|
Loading…
Reference in a new issue