diff options
author | Yen Chi Hsuan <yan12125@gmail.com> | 2015-06-22 15:02:53 +0800 |
---|---|---|
committer | Yen Chi Hsuan <yan12125@gmail.com> | 2015-06-22 15:07:32 +0800 |
commit | a5158f38a31e863a39de8f66c26469a5d4469280 (patch) | |
tree | 6e7221f2fc4d0e95147ee2e820b5530329ff8ac2 /youtube_dl | |
parent | c76799c5553b3b48bb7cc73dec452c3637a8670a (diff) |
[generic/adobetv] Support AdobeTVVideo embeds (#6039)
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/adobetv.py | 1 | ||||
-rw-r--r-- | youtube_dl/extractor/generic.py | 21 |
2 files changed, 22 insertions, 0 deletions
diff --git a/youtube_dl/extractor/adobetv.py b/youtube_dl/extractor/adobetv.py index 695a4a15c..5e43adc51 100644 --- a/youtube_dl/extractor/adobetv.py +++ b/youtube_dl/extractor/adobetv.py @@ -77,6 +77,7 @@ class AdobeTVVideoIE(InfoExtractor): _VALID_URL = r'https?://video\.tv\.adobe\.com/v/(?P<id>\d+)' _TEST = { + # From https://helpx.adobe.com/acrobat/how-to/new-experience-acrobat-dc.html?set=acrobat--get-started--essential-beginners 'url': 'https://video.tv.adobe.com/v/2456/', 'md5': '43662b577c018ad707a63766462b1e87', 'info_dict': { diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py index 20fcd8170..5c03fddc6 100644 --- a/youtube_dl/extractor/generic.py +++ b/youtube_dl/extractor/generic.py @@ -835,6 +835,18 @@ class GenericIE(InfoExtractor): 'title': 'Le débat', 'thumbnail': 're:^https?://.*\.jpe?g$', } + }, + # AdobeTVVideo embed + { + 'url': 'https://helpx.adobe.com/acrobat/how-to/new-experience-acrobat-dc.html?set=acrobat--get-started--essential-beginners', + 'md5': '43662b577c018ad707a63766462b1e87', + 'info_dict': { + 'id': '2456', + 'ext': 'mp4', + 'title': 'New experience with Acrobat DC', + 'description': 'New experience with Acrobat DC', + 'duration': 248.667, + }, } ] @@ -1518,6 +1530,15 @@ class GenericIE(InfoExtractor): if dmcloud_url: return self.url_result(dmcloud_url, 'DailymotionCloud') + # Look for AdobeTVVideo embeds + mobj = re.search( + r'<iframe[^>]+src=[\'"]((?:https?:)?//video\.tv\.adobe\.com/v/\d+[^"]+)[\'"]', + webpage) + if mobj is not None: + return self.url_result( + self._proto_relative_url(unescapeHTML(mobj.group(1))), + 'AdobeTVVideo') + def check_video(vurl): if YoutubeIE.suitable(vurl): return True |