diff options
author | Yen Chi Hsuan <yan12125@gmail.com> | 2016-07-02 21:50:17 +0800 |
---|---|---|
committer | Yen Chi Hsuan <yan12125@gmail.com> | 2016-07-02 21:58:07 +0800 |
commit | 7deef1ba6743bf11247565e63ed7e31d2e8a9382 (patch) | |
tree | 133461f9716a6495ab10d02ff362103ac972c908 /youtube_dl/extractor/generic.py | |
parent | fd6ca382628afbc4a229a15cd26552e226ac4536 (diff) |
[generic] Support Wordpress "YouTube Video Importer" plugin
Closes #9938
Diffstat (limited to 'youtube_dl/extractor/generic.py')
-rw-r--r-- | youtube_dl/extractor/generic.py | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py index 7212e0edd..35acb67f1 100644 --- a/youtube_dl/extractor/generic.py +++ b/youtube_dl/extractor/generic.py @@ -1279,7 +1279,19 @@ class GenericIE(InfoExtractor): 'ext': 'mp4', 'title': 'Facebook video #10153467542406923', }, - } + }, + # Wordpress "YouTube Video Importer" plugin + { + 'url': 'http://www.lothype.com/blue-devils-drumline-stanford-lot-2016/', + 'info_dict': { + 'id': 'HNTXWDXV9Is', + 'ext': 'mp4', + 'title': 'Blue Devils Drumline Stanford lot 2016', + 'upload_date': '20160627', + 'uploader_id': 'GENOCIDE8GENERAL10', + 'uploader': 'cylus cyrus', + }, + }, ] def report_following_redirect(self, new_url): @@ -1636,6 +1648,13 @@ class GenericIE(InfoExtractor): if matches: return _playlist_from_matches(matches, lambda m: unescapeHTML(m)) + # Look for Wordpress "YouTube Video Importer" plugin + matches = re.findall(r'''(?x)<div[^>]+ + class=(?P<q1>[\'"])[^\'"]*\byvii_single_video_player\b[^\'"]*(?P=q1)[^>]+ + data-video_id=(?P<q2>[\'"])([^\'"]+)(?P=q2)''', webpage) + if matches: + return _playlist_from_matches(matches, lambda m: m[-1]) + # Look for embedded Dailymotion player matches = re.findall( r'<(?:(?:embed|iframe)[^>]+?src=|input[^>]+id=[\'"]dmcloudUrlEmissionSelect[\'"][^>]+value=)(["\'])(?P<url>(?:https?:)?//(?:www\.)?dailymotion\.com/(?:embed|swf)/video/.+?)\1', webpage) |