[bbccouk] Improve _VALID_URL
authorSergey M․ <dstftw@gmail.com>
Fri, 30 Jan 2015 17:47:09 +0000 (23:47 +0600)
committerSergey M․ <dstftw@gmail.com>
Fri, 30 Jan 2015 17:47:09 +0000 (23:47 +0600)
youtube_dl/extractor/bbccouk.py

index 1cf48fe0dd739b328478899a83f0d8aba94e6c4a..126c8824cccedbca287ac3ebfc92d1a5e2d93b57 100644 (file)
@@ -10,7 +10,7 @@ from ..compat import compat_HTTPError
 class BBCCoUkIE(SubtitlesInfoExtractor):
     IE_NAME = 'bbc.co.uk'
     IE_DESC = 'BBC iPlayer'
-    _VALID_URL = r'https?://(?:www\.)?bbc\.co\.uk/(?:(?:(?:programmes|iplayer/(?:episode|playlist))/)|music/clips[/#])(?P<id>[\da-z]{8})'
+    _VALID_URL = r'https?://(?:www\.)?bbc\.co\.uk/(?:(?:(?:programmes|iplayer(?:/[^/]+)?/(?:episode|playlist))/)|music/clips[/#])(?P<id>[\da-z]{8})'
 
     _TESTS = [
         {
@@ -118,6 +118,9 @@ class BBCCoUkIE(SubtitlesInfoExtractor):
         }, {
             'url': 'http://www.bbc.co.uk/music/clips#p02frcc3',
             'only_matching': True,
+        }, {
+            'url': 'http://www.bbc.co.uk/iplayer/cbeebies/episode/b0480276/bing-14-atchoo',
+            'only_matching': True,
         }
     ]