浏览代码

[discoverygo] extend _VALID_URL to support other networks

Remita Amine 9 年之前
父节点
当前提交
7273e5849b
共有 1 个文件被更改,包括 11 次插入1 次删除
  1. 11 1
      youtube_dl/extractor/discoverygo.py

+ 11 - 1
youtube_dl/extractor/discoverygo.py

@@ -11,7 +11,17 @@ from ..utils import (
 
 
 class DiscoveryGoIE(InfoExtractor):
-    _VALID_URL = r'https?://(?:www\.)?discoverygo\.com/(?:[^/]+/)*(?P<id>[^/?#&]+)'
+    _VALID_URL = r'''(?x)https?://(?:www\.)?(?:
+            discovery|
+            investigationdiscovery|
+            discoverylife|
+            animalplanet|
+            ahctv|
+            destinationamerica|
+            sciencechannel|
+            tlc|
+            velocitychannel
+        )go\.com/(?:[^/]+/)*(?P<id>[^/?#&]+)'''
     _TEST = {
         'url': 'https://www.discoverygo.com/love-at-first-kiss/kiss-first-ask-questions-later/',
         'info_dict': {