]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[vidme:user] Relax _VALID_URLs
authortheychx <boomingzooming@gmail.com>
Mon, 28 Aug 2017 19:35:57 +0000 (21:35 +0200)
committerSergey M․ <dstftw@gmail.com>
Sun, 3 Sep 2017 10:03:45 +0000 (17:03 +0700)
youtube_dl/extractor/vidme.py

index a7971d72ee8479c843dde552d88bc0c324db0562..39b65ed2f7657d62251e103b22285255786bfc6e 100644 (file)
@@ -263,29 +263,43 @@ class VidmeListBaseIE(InfoExtractor):
 
 class VidmeUserIE(VidmeListBaseIE):
     IE_NAME = 'vidme:user'
-    _VALID_URL = r'https?://vid\.me/(?:e/)?(?P<id>[\da-zA-Z]{6,})(?!/likes)(?:[^\da-zA-Z]|$)'
+    _VALID_URL = r'https?://vid\.me/(?:e/)?(?P<id>[\da-zA-Z_-]{6,})(?!/likes)(?:[^\da-zA-Z_-]|$)'
     _API_ITEM = 'list'
     _TITLE = 'Videos'
-    _TEST = {
-        'url': 'https://vid.me/EFARCHIVE',
+    _TESTS = [{
+        'url': 'https://vid.me/MasakoX',
         'info_dict': {
-            'id': '3834632',
-            'title': 'EFARCHIVE - %s' % _TITLE,
+            'id': '16112341',
+            'title': 'MasakoX - %s' % _TITLE,
         },
-        'playlist_mincount': 238,
-    }
+        'playlist_mincount': 191,
+    }, {
+        'url': 'https://vid.me/unsQuare_netWork',
+        'info_dict': {
+            'id': '16148757',
+            'title': 'unsQuare_netWork - %s' % _TITLE,
+        },
+        'playlist_mincount': 73,
+    }]
 
 
 class VidmeUserLikesIE(VidmeListBaseIE):
     IE_NAME = 'vidme:user:likes'
-    _VALID_URL = r'https?://vid\.me/(?:e/)?(?P<id>[\da-zA-Z]{6,})/likes'
+    _VALID_URL = r'https?://vid\.me/(?:e/)?(?P<id>[\da-zA-Z_-]{6,})/likes'
     _API_ITEM = 'likes'
     _TITLE = 'Likes'
-    _TEST = {
+    _TESTS = [{
         'url': 'https://vid.me/ErinAlexis/likes',
         'info_dict': {
             'id': '6483530',
             'title': 'ErinAlexis - %s' % _TITLE,
         },
         'playlist_mincount': 415,
-    }
+    }, {
+        'url': 'https://vid.me/Kaleidoscope-Ish/likes',
+        'info_dict': {
+            'id': '16908594',
+            'title': 'Kaleidoscope-Ish - %s' % _TITLE,
+        },
+        'playlist_mincount': 43,
+    }]