]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[rtp] Also match e-id-less URLs (#4382)
authorPhilipp Hagemeister <phihag@phihag.de>
Sat, 13 Dec 2014 23:13:07 +0000 (00:13 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Sat, 13 Dec 2014 23:13:07 +0000 (00:13 +0100)
youtube_dl/extractor/rtp.py

index 0bed1f1006efa53d80064abd68c16d2689f514d4..54f67a52f75ad1a9a8d608902cf1845fe728a6d8 100644 (file)
@@ -8,8 +8,8 @@ from ..utils import js_to_json
 
 
 class RTPIE(InfoExtractor):
-    _VALID_URL = r'https?://(?:www\.)?rtp\.pt/play/p(?P<program_id>[0-9]+)/e(?P<id>[0-9]+)/?'
-    _TEST = {
+    _VALID_URL = r'https?://(?:www\.)?rtp\.pt/play/p(?P<program_id>[0-9]+)/(?P<id>[^/?#]+)/?'
+    _TESTS = [{
         'url': 'http://www.rtp.pt/play/p405/e174042/paixoes-cruzadas',
         'info_dict': {
             'id': '174042',
@@ -21,7 +21,10 @@ class RTPIE(InfoExtractor):
         'params': {
             'skip_download': True,  # RTMP download
         },
-    }
+    }, {
+        'url': 'http://www.rtp.pt/play/p831/a-quimica-das-coisas',
+        'only_matching': True,
+    }]
 
     def _real_extract(self, url):
         video_id = self._match_id(url)