From 840f28213cb661fc9d380a049c47edff4d2eaaf5 Mon Sep 17 00:00:00 2001 From: yasho2101 <62981580+yasho2101@users.noreply.github.com> Date: Sun, 12 Apr 2020 10:41:21 +0530 Subject: [PATCH] Koreus Added extractor for koreus.com --- youtube_dl/extractor/extractors.py | 1 + youtube_dl/extractor/koreus.py | 39 ++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 youtube_dl/extractor/koreus.py diff --git a/youtube_dl/extractor/extractors.py b/youtube_dl/extractor/extractors.py index e407ab3d9..0b57524af 100644 --- a/youtube_dl/extractor/extractors.py +++ b/youtube_dl/extractor/extractors.py @@ -511,6 +511,7 @@ from .kickstarter import KickStarterIE from .kinja import KinjaEmbedIE from .kinopoisk import KinoPoiskIE from .konserthusetplay import KonserthusetPlayIE +from .koreus import koreusIE from .krasview import KrasViewIE from .ku6 import Ku6IE from .kusi import KUSIIE diff --git a/youtube_dl/extractor/koreus.py b/youtube_dl/extractor/koreus.py new file mode 100644 index 000000000..5714abf4c --- /dev/null +++ b/youtube_dl/extractor/koreus.py @@ -0,0 +1,39 @@ +from __future__ import unicode_literals +from .common import InfoExtractor + + +class koreusIE(InfoExtractor): + _VALID_URL = r'https:\/\/www\.koreus\.com/video/(?P\S+)' + + _TESTS = [{ + 'url': 'https://www.koreus.com/video/pub-mazda-drague.html', + 'info_dict': { + 'id': 'pub-mazda-drague', + 'ext': 'mp4', + 'title': 'Pub Mazda (Drague)', + } + + }] + + def _real_extract(self, url): + video_id = self._match_id(url) + + webpage = self._download_webpage( + url, video_id + ) + + title = self._html_search_regex(r'(.+?)', webpage, 'title') + + download_url = self._html_search_regex( + + r'