]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[rts] Improve _VALID_URL
authorSergey M․ <dstftw@gmail.com>
Tue, 2 Dec 2014 14:53:19 +0000 (20:53 +0600)
committerSergey M․ <dstftw@gmail.com>
Tue, 2 Dec 2014 14:53:19 +0000 (20:53 +0600)
youtube_dl/extractor/rts.py

index 82d7830780058b136379688c26f1e49f790845ee..c31049c0e69a3bc11eba32541ce0f158964a1549 100644 (file)
@@ -15,7 +15,7 @@ from ..utils import (
 
 class RTSIE(InfoExtractor):
     IE_DESC = 'RTS.ch'
-    _VALID_URL = r'^https?://(?:www\.)?rts\.ch/(?:(?:[^/]+/){2,}(?P<id>[0-9]+)-(?P<display_id>.+?)\.html|play/tv/-/video/(?P<display_id_new>.+?)\?id=(?P<id_new>[0-9]+))'
+    _VALID_URL = r'^https?://(?:www\.)?rts\.ch/(?:(?:[^/]+/){2,}(?P<id>[0-9]+)-(?P<display_id>.+?)\.html|play/tv/[^/]+/video/(?P<display_id_new>.+?)\?id=(?P<id_new>[0-9]+))'
 
     _TESTS = [
         {
@@ -117,6 +117,10 @@ class RTSIE(InfoExtractor):
                 'thumbnail': 're:^https?://.*\.image',
                 'view_count': int,
             },
+        },
+        {
+            'url': 'http://www.rts.ch/play/tv/le-19h30/video/le-chantier-du-nouveau-parlement-vaudois-a-permis-une-trouvaille-historique?id=6348280',
+            'only_matching': True,
         }
     ]