aboutsummaryrefslogtreecommitdiffhomepage
path: root/youtube_dl/extractor/aol.py
diff options
context:
space:
mode:
authorRemita Amine <[email protected]>2021-01-19 14:49:45 +0100
committerRemita Amine <[email protected]>2021-01-19 14:49:45 +0100
commitb79977fb6b1b2cea0231e5e25e201db05c0d1dba (patch)
tree007dfdf4f653fd7d073c89ec0a7c9cf563203511 /youtube_dl/extractor/aol.py
parentbc7c8f3d4ea6cb98fa62a5fe457046dd4e9b5379 (diff)
downloadyoutube-dl-b79977fb6b1b2cea0231e5e25e201db05c0d1dba.tar.gz
youtube-dl-b79977fb6b1b2cea0231e5e25e201db05c0d1dba.zip
[aol] add support for yahoo videos(closes #26650)
Diffstat (limited to 'youtube_dl/extractor/aol.py')
-rw-r--r--youtube_dl/extractor/aol.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/youtube_dl/extractor/aol.py b/youtube_dl/extractor/aol.py
index e87994a6a..f6ecb8438 100644
--- a/youtube_dl/extractor/aol.py
+++ b/youtube_dl/extractor/aol.py
@@ -3,7 +3,7 @@ from __future__ import unicode_literals
import re
-from .common import InfoExtractor
+from .yahoo import YahooIE
from ..compat import (
compat_parse_qs,
compat_urllib_parse_urlparse,
@@ -15,9 +15,9 @@ from ..utils import (
)
-class AolIE(InfoExtractor):
+class AolIE(YahooIE):
IE_NAME = 'aol.com'
- _VALID_URL = r'(?:aol-video:|https?://(?:www\.)?aol\.(?:com|ca|co\.uk|de|jp)/video/(?:[^/]+/)*)(?P<id>[0-9a-f]+)'
+ _VALID_URL = r'(?:aol-video:|https?://(?:www\.)?aol\.(?:com|ca|co\.uk|de|jp)/video/(?:[^/]+/)*)(?P<id>\d{9}|[0-9a-f]{24}|[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12})'
_TESTS = [{
# video with 5min ID
@@ -76,10 +76,16 @@ class AolIE(InfoExtractor):
}, {
'url': 'https://www.aol.jp/video/playlist/5a28e936a1334d000137da0c/5a28f3151e642219fde19831/',
'only_matching': True,
+ }, {
+ # Yahoo video
+ 'url': 'https://www.aol.com/video/play/991e6700-ac02-11ea-99ff-357400036f61/24bbc846-3e30-3c46-915e-fe8ccd7fcc46/',
+ 'only_matching': True,
}]
def _real_extract(self, url):
video_id = self._match_id(url)
+ if '-' in video_id:
+ return self._extract_yahoo_video(video_id, 'us')
response = self._download_json(
'https://feedapi.b2c.on.aol.com/v1.0/app/videos/aolon/%s/details' % video_id,