projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9c48b5a
)
[ign] Add another video id pattern (closes #13328)
author
Argn0
<Argn0@users.noreply.github.com>
Sat, 24 Jun 2017 18:59:15 +0000
(20:59 +0200)
committer
Sergey M
<dstftw@gmail.com>
Sat, 24 Jun 2017 18:59:15 +0000
(
01:59
+0700)
youtube_dl/extractor/ign.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/ign.py
b/youtube_dl/extractor/ign.py
index c45c68c1d6ff523ddcbb5144e260bc931fb09873..c1367cf517ce9b39960a13705b4475bf4f3cf8d1 100644
(file)
--- a/
youtube_dl/extractor/ign.py
+++ b/
youtube_dl/extractor/ign.py
@@
-89,6
+89,11
@@
class IGNIE(InfoExtractor):
'url': 'http://me.ign.com/ar/angry-birds-2/106533/video/lrd-ldyy-lwl-lfylm-angry-birds',
'only_matching': True,
},
'url': 'http://me.ign.com/ar/angry-birds-2/106533/video/lrd-ldyy-lwl-lfylm-angry-birds',
'only_matching': True,
},
+ {
+ # videoId pattern
+ 'url': 'http://www.ign.com/articles/2017/06/08/new-ducktales-short-donalds-birthday-doesnt-go-as-planned',
+ 'only_matching': True,
+ },
]
def _find_video_id(self, webpage):
]
def _find_video_id(self, webpage):
@@
-98,6
+103,8
@@
class IGNIE(InfoExtractor):
r'data-video-id="(.+?)"',
r'<object id="vid_(.+?)"',
r'<meta name="og:image" content=".*/(.+?)-(.+?)/.+.jpg"',
r'data-video-id="(.+?)"',
r'<object id="vid_(.+?)"',
r'<meta name="og:image" content=".*/(.+?)-(.+?)/.+.jpg"',
+ r'videoId"\s*:\s*"(.+?)"',
+ r'videoId["\']\s*:\s*["\']([^"\']+?)["\']',
]
return self._search_regex(res_id, webpage, 'video id', default=None)
]
return self._search_regex(res_id, webpage, 'video id', default=None)