projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1ef1563
)
[srgssr] fix regex for swissinfo.ch
author
remitamine
<remitamine@gmail.com>
Fri, 9 Oct 2015 19:34:03 +0000
(20:34 +0100)
committer
remitamine
<remitamine@gmail.com>
Fri, 9 Oct 2015 19:34:03 +0000
(20:34 +0100)
youtube_dl/extractor/srgssr.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/srgssr.py
b/youtube_dl/extractor/srgssr.py
index addf4d26eef61767bdd0f5a41b288b73d5948e4e..3b5dcc5030fa87e6b48c859c47850db406619b23 100644
(file)
--- a/
youtube_dl/extractor/srgssr.py
+++ b/
youtube_dl/extractor/srgssr.py
@@
-96,7
+96,7
@@
class SRGSSRIE(InfoExtractor):
class SRGSSRPlayIE(InfoExtractor):
class SRGSSRPlayIE(InfoExtractor):
- _VALID_URL = r'https?://(?:(?:www|play)\.)?(?P<bu>srf|rts|rsi|rtr|swi)\.ch/play/(?:tv|radio)/[^/]+/(?P<type>video|audio)/[^?]+\?id=(?P<id>[0-9a-f\-]{36}|\d+)'
+ _VALID_URL = r'https?://(?:(?:www|play)\.)?(?P<bu>srf|rts|rsi|rtr|swi
ssinfo
)\.ch/play/(?:tv|radio)/[^/]+/(?P<type>video|audio)/[^?]+\?id=(?P<id>[0-9a-f\-]{36}|\d+)'
_TESTS = [{
'url': 'http://www.srf.ch/play/tv/10vor10/video/snowden-beantragt-asyl-in-russland?id=28e1a57d-5b76-4399-8ab3-9097f071e6c5',
_TESTS = [{
'url': 'http://www.srf.ch/play/tv/10vor10/video/snowden-beantragt-asyl-in-russland?id=28e1a57d-5b76-4399-8ab3-9097f071e6c5',
@@
-120,11
+120,8
@@
class SRGSSRPlayIE(InfoExtractor):
'description': 'md5:88604432b60d5a38787f152dec89cd56',
'timestamp': 1373493600,
},
'description': 'md5:88604432b60d5a38787f152dec89cd56',
'timestamp': 1373493600,
},
- }, {
- 'url': 'http://www.srf.ch/player/tv/10vor10/video/snowden-beantragt-asyl-in-russland?id=28e1a57d-5b76-4399-8ab3-9097f071e6c5',
- 'only_matching': True,
}]
def _real_extract(self, url):
bu, media_type, media_id = re.match(self._VALID_URL, url).groups()
}]
def _real_extract(self, url):
bu, media_type, media_id = re.match(self._VALID_URL, url).groups()
- return self.url_result('urn:%s:%s:%s' % (bu, media_type, media_id), 'SRGSSR')
+ return self.url_result('urn:%s:%s:%s' % (bu
[:3]
, media_type, media_id), 'SRGSSR')