[periscope] Relax _VALID_URL (Closes #7503)
authorSergey M․ <dstftw@gmail.com>
Sat, 14 Nov 2015 18:20:17 +0000 (00:20 +0600)
committerSergey M․ <dstftw@gmail.com>
Sat, 14 Nov 2015 18:20:17 +0000 (00:20 +0600)
youtube_dl/extractor/periscope.py

index 459fa2c43c373b6ff4e4683b707bae20c5ddf05c..63cc764bb8eceed80893606e640466b355279a0d 100644 (file)
@@ -7,7 +7,7 @@ from ..utils import parse_iso8601
 
 class PeriscopeIE(InfoExtractor):
     IE_DESC = 'Periscope'
-    _VALID_URL = r'https?://(?:www\.)?periscope\.tv/w/(?P<id>[^/?#]+)'
+    _VALID_URL = r'https?://(?:www\.)?periscope\.tv/[^/]+/(?P<id>[^/?#]+)'
     # Alive example URLs can be found here http://onperiscope.com/
     _TESTS = [{
         'url': 'https://www.periscope.tv/w/aJUQnjY3MjA3ODF8NTYxMDIyMDl2zCg2pECBgwTqRpQuQD352EMPTKQjT4uqlM3cgWFA-g==',
@@ -25,6 +25,9 @@ class PeriscopeIE(InfoExtractor):
     }, {
         'url': 'https://www.periscope.tv/w/1ZkKzPbMVggJv',
         'only_matching': True,
+    }, {
+        'url': 'https://www.periscope.tv/bastaakanoggano/1OdKrlkZZjOJX',
+        'only_matching': True,
     }]
 
     def _call_api(self, method, value):