浏览代码

[funimation] Extend _VALID_URL to match promotional videos

Sergey M․ 9 年之前
父节点
当前提交
b091529a3c
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      youtube_dl/extractor/funimation.py

+ 4 - 1
youtube_dl/extractor/funimation.py

@@ -15,7 +15,7 @@ from ..utils import (
 
 
 class FunimationIE(InfoExtractor):
-    _VALID_URL = r'https?://(?:www\.)?funimation\.com/shows/[^/]+/videos/official/(?P<id>[^/?#&]+)'
+    _VALID_URL = r'https?://(?:www\.)?funimation\.com/shows/[^/]+/videos/(?:official|promotional)/(?P<id>[^/?#&]+)'
 
     _TESTS = [{
         'url': 'http://www.funimation.com/shows/air/videos/official/breeze',
@@ -37,6 +37,9 @@ class FunimationIE(InfoExtractor):
             'description': 'md5:b602bdc15eef4c9bbb201bb6e6a4a2dd',
             'thumbnail': 're:https?://.*\.jpg',
         },
+    }, {
+        'url': 'http://www.funimation.com/shows/attack-on-titan-junior-high/videos/promotional/broadcast-dub-preview',
+        'only_matching': True,
     }]
 
     def _login(self):