projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3f514a3
)
[generic] Do not download images as videos by accident
author
Philipp Hagemeister
<phihag@phihag.de>
Wed, 27 Aug 2014 00:07:11 +0000
(
02:07
+0200)
committer
Philipp Hagemeister
<phihag@phihag.de>
Wed, 27 Aug 2014 00:07:11 +0000
(
02:07
+0200)
youtube_dl/extractor/generic.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/generic.py
b/youtube_dl/extractor/generic.py
index 3a908d01f23dbfac41ea124c65336cc12eb79e86..6622df81e91a474ca2cc12525588981d5a238861 100644
(file)
--- a/
youtube_dl/extractor/generic.py
+++ b/
youtube_dl/extractor/generic.py
@@
-830,7
+830,8
@@
class GenericIE(InfoExtractor):
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)))