summary refs log tree commit diff
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-12-14 00:13:07 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2014-12-14 00:13:07 +0100
commitbad5c1a3037e7630d599a002fa80790a446cfe77 (patch)
treef64365c2514807e9982027b00793c4c57d95469c
parent6f18cc9abc081c715596dc3616dd8362a427a962 (diff)
downloadyoutube-dl-bad5c1a3037e7630d599a002fa80790a446cfe77.tar.gz
youtube-dl-bad5c1a3037e7630d599a002fa80790a446cfe77.tar.xz
youtube-dl-bad5c1a3037e7630d599a002fa80790a446cfe77.zip
[rtp] Also match e-id-less URLs (#4382)
-rw-r--r--youtube_dl/extractor/rtp.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/youtube_dl/extractor/rtp.py b/youtube_dl/extractor/rtp.py
index 0bed1f100..54f67a52f 100644
--- a/youtube_dl/extractor/rtp.py
+++ b/youtube_dl/extractor/rtp.py
@@ -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)