]> jfr.im git - yt-dlp.git/commitdiff
[extractor/vidio] Support embed link (#4564)
authorHobbyistDev <redacted>
Fri, 5 Aug 2022 13:06:42 +0000 (22:06 +0900)
committerGitHub <redacted>
Fri, 5 Aug 2022 13:06:42 +0000 (18:36 +0530)
Authored by: HobbyistDev

yt_dlp/extractor/vidio.py

index 8092d340e84c1b15bf23ddcd3e1a6a945703a4f3..8d3abceed6fa52ca054fc5a6e739dff44b532204 100644 (file)
@@ -67,10 +67,10 @@ def _call_api(self, url, video_id, note=None):
 
 
 class VidioIE(VidioBaseIE):
-    _VALID_URL = r'https?://(?:www\.)?vidio\.com/watch/(?P<id>\d+)-(?P<display_id>[^/?#&]+)'
+    _VALID_URL = r'https?://(?:www\.)?vidio\.com/(watch|embed)/(?P<id>\d+)-(?P<display_id>[^/?#&]+)'
     _TESTS = [{
         'url': 'http://www.vidio.com/watch/165683-dj_ambred-booyah-live-2015',
-        'md5': 'cd2801394afc164e9775db6a140b91fe',
+        'md5': 'abac81b1a205a8d94c609a473b5ea62a',
         'info_dict': {
             'id': '165683',
             'display_id': 'dj_ambred-booyah-live-2015',
@@ -89,7 +89,8 @@ class VidioIE(VidioBaseIE):
             'view_count': int,
             'dislike_count': int,
             'comment_count': int,
-            'tags': 'count:4',
+            'tags': 'count:3',
+            'uploader_url': 'https://www.vidio.com/@twelvepictures',
         },
     }, {
         'url': 'https://www.vidio.com/watch/77949-south-korea-test-fires-missile-that-can-strike-all-of-the-north',
@@ -98,6 +99,30 @@ class VidioIE(VidioBaseIE):
         # Premier-exclusive video
         'url': 'https://www.vidio.com/watch/1550718-stand-by-me-doraemon',
         'only_matching': True
+    }, {
+        # embed url from https://enamplus.liputan6.com/read/5033648/video-fakta-temuan-suspek-cacar-monyet-di-jawa-tengah
+        'url': 'https://www.vidio.com/embed/7115874-fakta-temuan-suspek-cacar-monyet-di-jawa-tengah',
+        'info_dict': {
+            'id': '7115874',
+            'ext': 'mp4',
+            'channel_id': '40172876',
+            'comment_count': int,
+            'uploader_id': 'liputan6',
+            'view_count': int,
+            'dislike_count': int,
+            'upload_date': '20220804',
+            'uploader': 'Liputan6.com',
+            'display_id': 'fakta-temuan-suspek-cacar-monyet-di-jawa-tengah',
+            'channel': 'ENAM PLUS 165',
+            'timestamp': 1659605520,
+            'title': 'Fakta Temuan Suspek Cacar Monyet di Jawa Tengah',
+            'duration': 59,
+            'like_count': int,
+            'tags': ['monkeypox indonesia', 'cacar monyet menyebar', 'suspek cacar monyet di indonesia', 'fakta', 'hoax atau bukan?', 'jawa tengah'],
+            'thumbnail': 'https://thumbor.prod.vidiocdn.com/83PN-_BKm5sS7emLtRxl506MLqQ=/640x360/filters:quality(70)/vidio-web-prod-video/uploads/video/image/7115874/fakta-suspek-cacar-monyet-di-jawa-tengah-24555a.jpg',
+            'uploader_url': 'https://www.vidio.com/@liputan6',
+            'description': 'md5:6d595a18d3b19ee378e335a6f288d5ac',
+        },
     }]
 
     def _real_extract(self, url):