mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-11 02:17:21 +08:00
[acorntv] Add support for Acorn.tv
This commit is contained in:
parent
f0298f653e
commit
2ef2aa2b53
38
youtube_dl/extractor/acorntv.py
Executable file
38
youtube_dl/extractor/acorntv.py
Executable file
@ -0,0 +1,38 @@
|
|||||||
|
# coding: utf-8
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
import re
|
||||||
|
|
||||||
|
from .common import InfoExtractor
|
||||||
|
|
||||||
|
|
||||||
|
class AcornTVIE(InfoExtractor):
|
||||||
|
_VALID_URL = r'https?://(?:www\.)?acorn\.tv/.*'
|
||||||
|
|
||||||
|
_TEST = {
|
||||||
|
'url': 'https://acorn.tv/darkages/thedarkagesanageoflight/the-clash-of-the-gods',
|
||||||
|
'info_dict': {
|
||||||
|
'id': 'ref:D7718E01',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'title': 'The Dark Ages: An Age of Light, Episode 1: The Clash of the Gods',
|
||||||
|
'description': 'DARKAGES_SR1_EP1',
|
||||||
|
'thumbnail': r're:^https?://.*\.jpg',
|
||||||
|
'duration': 3575.2,
|
||||||
|
'timestamp': 1435154967,
|
||||||
|
'upload_date': '20150624',
|
||||||
|
'uploader_id': '3047407010001',
|
||||||
|
},
|
||||||
|
'params': {
|
||||||
|
'skip_download': True,
|
||||||
|
},
|
||||||
|
'add_ie': ['BrightcoveNew'],
|
||||||
|
}
|
||||||
|
|
||||||
|
def _real_extract(self, url):
|
||||||
|
webpage = self._download_webpage(url, 'video')
|
||||||
|
|
||||||
|
video_id = re.findall(r'data-video-id=\"(.*)\"', webpage)[0]
|
||||||
|
|
||||||
|
return self.url_result(
|
||||||
|
'http://players.brightcove.net/3047407010001/default_default/index.html?videoId=%s'
|
||||||
|
% video_id, 'BrightcoveNew')
|
@ -18,6 +18,7 @@ from .acast import (
|
|||||||
ACastIE,
|
ACastIE,
|
||||||
ACastChannelIE,
|
ACastChannelIE,
|
||||||
)
|
)
|
||||||
|
from .acorntv import AcornTVIE
|
||||||
from .addanime import AddAnimeIE
|
from .addanime import AddAnimeIE
|
||||||
from .adn import ADNIE
|
from .adn import ADNIE
|
||||||
from .adobetv import (
|
from .adobetv import (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user