mirror of
https://github.com/l1ving/youtube-dl
synced 2024-12-21 21:22:50 +08:00
[rtp] Also match e-id-less URLs (#4382)
This commit is contained in:
parent
6f18cc9abc
commit
bad5c1a303
@ -8,8 +8,8 @@ from ..utils import js_to_json
|
|||||||
|
|
||||||
|
|
||||||
class RTPIE(InfoExtractor):
|
class RTPIE(InfoExtractor):
|
||||||
_VALID_URL = r'https?://(?:www\.)?rtp\.pt/play/p(?P<program_id>[0-9]+)/e(?P<id>[0-9]+)/?'
|
_VALID_URL = r'https?://(?:www\.)?rtp\.pt/play/p(?P<program_id>[0-9]+)/(?P<id>[^/?#]+)/?'
|
||||||
_TEST = {
|
_TESTS = [{
|
||||||
'url': 'http://www.rtp.pt/play/p405/e174042/paixoes-cruzadas',
|
'url': 'http://www.rtp.pt/play/p405/e174042/paixoes-cruzadas',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '174042',
|
'id': '174042',
|
||||||
@ -21,7 +21,10 @@ class RTPIE(InfoExtractor):
|
|||||||
'params': {
|
'params': {
|
||||||
'skip_download': True, # RTMP download
|
'skip_download': True, # RTMP download
|
||||||
},
|
},
|
||||||
}
|
}, {
|
||||||
|
'url': 'http://www.rtp.pt/play/p831/a-quimica-das-coisas',
|
||||||
|
'only_matching': True,
|
||||||
|
}]
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
video_id = self._match_id(url)
|
video_id = self._match_id(url)
|
||||||
|
Loading…
Reference in New Issue
Block a user