From dcfe3eedf5c9bb537bf39c6fbd7337d5ae4d881a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A9stin=20Reed?= Date: Sun, 26 Jun 2016 01:29:48 +0200 Subject: [PATCH 1/2] [DBTV] Add support for articles --- youtube_dl/extractor/dbtv.py | 26 ++++++++++++++++++++++++++ youtube_dl/extractor/extractors.py | 5 ++++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/dbtv.py b/youtube_dl/extractor/dbtv.py index 133cdc50b..dab9bee13 100644 --- a/youtube_dl/extractor/dbtv.py +++ b/youtube_dl/extractor/dbtv.py @@ -79,3 +79,29 @@ class DBTVIE(InfoExtractor): 'categories': video.get('tags'), 'formats': formats, } + + +class DagbladetArticleIE(InfoExtractor): + _VALID_URL = r'https?://(?:www\.)?dagbladet\.no/(?:\d+/){3}(?:[\w-]+/)+(?P\d+)' + _TEST = { + 'url': 'http://www.dagbladet.no/2016/02/23/nyheter/nordlys/ski/troms/ver/43254897/', + 'info_dict': { + 'id': '43254897', + 'title': 'Etter ett \xe5rs planlegging, klaffet endelig alt: - Jeg m\xe5tte ta en liten dans', + }, + 'playlist_count': 3, + } + + def _real_extract(self, url): + article_id = self._match_id(url) + webpage = self._download_webpage(url, article_id) + + iframe_urls = re.findall(r'