瀏覽代碼

[aol] Improve _VALID_URL (Closes #9381)

Sergey M․ 9 年之前
父節點
當前提交
964f49336f
共有 1 個文件被更改,包括 7 次插入1 次删除
  1. 7 1
      youtube_dl/extractor/aol.py

+ 7 - 1
youtube_dl/extractor/aol.py

@@ -12,7 +12,7 @@ from ..utils import (
 
 
 class AolIE(InfoExtractor):
 class AolIE(InfoExtractor):
     IE_NAME = 'on.aol.com'
     IE_NAME = 'on.aol.com'
-    _VALID_URL = r'(?:aol-video:|https?://on\.aol\.com/.*-)(?P<id>[^/?-]+)'
+    _VALID_URL = r'(?:aol-video:|https?://on\.aol\.com/(?:[^/]+/)*(?:[^/?#&]+-)?)(?P<id>[^/?#&]+)'
 
 
     _TESTS = [{
     _TESTS = [{
         # video with 5min ID
         # video with 5min ID
@@ -53,6 +53,12 @@ class AolIE(InfoExtractor):
     }, {
     }, {
         'url': 'http://on.aol.com/shows/park-bench-shw518173474-559a1b9be4b0c3bfad3357a7?context=SH:SHW518173474:PL4327:1460619712763',
         'url': 'http://on.aol.com/shows/park-bench-shw518173474-559a1b9be4b0c3bfad3357a7?context=SH:SHW518173474:PL4327:1460619712763',
         'only_matching': True,
         'only_matching': True,
+    }, {
+        'url': 'http://on.aol.com/video/519442220',
+        'only_matching': True,
+    }, {
+        'url': 'aol-video:5707d6b8e4b090497b04f706',
+        'only_matching': True,
     }]
     }]
 
 
     def _real_extract(self, url):
     def _real_extract(self, url):