From: Philipp Hagemeister Date: Sat, 13 Dec 2014 23:13:07 +0000 (+0100) Subject: [rtp] Also match e-id-less URLs (#4382) X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=bad5c1a3037e7630d599a002fa80790a446cfe77;p=youtube-dl [rtp] Also match e-id-less URLs (#4382) --- 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[0-9]+)/e(?P[0-9]+)/?' - _TEST = { + _VALID_URL = r'https?://(?:www\.)?rtp\.pt/play/p(?P[0-9]+)/(?P[^/?#]+)/?' + _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)