]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[cbc] Fix for old-styled URLs
authorYen Chi Hsuan <yan12125@gmail.com>
Fri, 20 May 2016 10:39:54 +0000 (18:39 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Fri, 20 May 2016 10:39:54 +0000 (18:39 +0800)
The URL http://www.cbc.ca/player/News/ID/2672225049/ (#6342) redirects
to http://www.cbc.ca/player/play/2672224672, while youtube-dl wasn't
able to handle it correctly.

youtube_dl/extractor/cbc.py

index 581928f7d2b570717f3f29df4da6989ce60e8cb1..daf237ca8e887a1afe0e1383e45a9e238fba14a2 100644 (file)
@@ -11,7 +11,7 @@ from ..utils import (
 
 
 class CBCIE(InfoExtractor):
-    _VALID_URL = r'https?://(?:www\.)?cbc\.ca/(?:[^/]+/)+(?P<id>[^/?#]+)'
+    _VALID_URL = r'https?://(?:www\.)?cbc\.ca/(?!player/)(?:[^/]+/)+(?P<id>[^/?#]+)'
     _TESTS = [{
         # with mediaId
         'url': 'http://www.cbc.ca/22minutes/videos/clips-season-23/don-cherry-play-offs',