]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[generic/adobetv] Support AdobeTVVideo embeds (#6039)
authorYen Chi Hsuan <yan12125@gmail.com>
Mon, 22 Jun 2015 07:02:53 +0000 (15:02 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Mon, 22 Jun 2015 07:07:32 +0000 (15:07 +0800)
youtube_dl/extractor/adobetv.py
youtube_dl/extractor/generic.py

index 695a4a15c51a752979cd570f744d6cf09ca1abaf..5e43adc51f98c2f22e728c49150b84ae64f704e3 100644 (file)
@@ -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': {
index 20fcd81708d130243e3de772503380539479cec7..5c03fddc6a2ee548a6617a3aea9ba161f6b3777d 100644 (file)
@@ -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