diff options
author | Remita Amine <remitamine@gmail.com> | 2016-06-30 04:08:24 +0100 |
---|---|---|
committer | Remita Amine <remitamine@gmail.com> | 2016-06-30 04:08:56 +0100 |
commit | ab47b6e881269a0329b78a294318745a54e9e7c7 (patch) | |
tree | a58e9438ee0253396061a8bc87a31c294cbdfb6f /youtube_dl | |
parent | df43389ade6e7a6394521ae91c0640508dceb4dc (diff) |
[theatlantic] Add new extractor(closes #6611)
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/extractors.py | 1 | ||||
-rw-r--r-- | youtube_dl/extractor/theatlantic.py | 40 |
2 files changed, 41 insertions, 0 deletions
diff --git a/youtube_dl/extractor/extractors.py b/youtube_dl/extractor/extractors.py index 80d1bbe20..d9ffde449 100644 --- a/youtube_dl/extractor/extractors.py +++ b/youtube_dl/extractor/extractors.py @@ -799,6 +799,7 @@ from .teletask import TeleTaskIE from .telewebion import TelewebionIE from .testurl import TestURLIE from .tf1 import TF1IE +from .theatlantic import TheAtlanticIE from .theintercept import TheInterceptIE from .theplatform import ( ThePlatformIE, diff --git a/youtube_dl/extractor/theatlantic.py b/youtube_dl/extractor/theatlantic.py new file mode 100644 index 000000000..df4254fea --- /dev/null +++ b/youtube_dl/extractor/theatlantic.py @@ -0,0 +1,40 @@ +# coding: utf-8 +from __future__ import unicode_literals + +from .common import InfoExtractor + + +class TheAtlanticIE(InfoExtractor): + _VALID_URL = r'https?://(?:www\.)?theatlantic\.com/video/index/(?P<id>\d+)' + _TEST = { + 'url': 'http://www.theatlantic.com/video/index/477918/capture-a-unified-theory-on-mental-health/', + 'md5': '', + 'info_dict': { + 'id': '477918', + 'ext': 'mp4', + 'title': 'Are All Mental Illnesses Related?', + 'description': 'Depression, anxiety, overeating, addiction, and all other mental disorders share a common mechanism.', + 'timestamp': 1460490952, + 'uploader': 'TheAtlantic', + 'upload_date': '20160412', + 'uploader_id': '29913724001', + }, + 'params': { + # m3u8 download + 'skip_download': True, + }, + 'add_ie': ['BrightcoveLegacy'], + } + + def _real_extract(self, url): + video_id = self._match_id(url) + webpage = self._download_webpage(url, video_id) + return { + '_type': 'url_transparent', + 'url': self._html_search_meta('twitter:player', webpage), + 'id': video_id, + 'title': self._og_search_title(webpage), + 'description': self._og_search_description(webpage), + 'thumbnail': self._og_search_thumbnail(webpage), + 'ie_key': 'BrightcoveLegacy', + } |