Skip to content

Commit

Permalink
[rtp] Also match e-id-less URLs (#4382)
Browse files Browse the repository at this point in the history
  • Loading branch information
phihag committed Dec 13, 2014
1 parent 6f18cc9 commit bad5c1a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions youtube_dl/extractor/rtp.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@


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',
Expand All @@ -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)
Expand Down

0 comments on commit bad5c1a

Please sign in to comment.