1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-11-22 16:44:32 +01:00
Added extractor for koreus.com
This commit is contained in:
yasho2101 2020-04-12 10:41:21 +05:30
parent 00eb865b3c
commit 840f28213c
2 changed files with 40 additions and 0 deletions

View File

@ -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

View File

@ -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<id>\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'<title>(.+?)</title>', webpage, 'title')
download_url = self._html_search_regex(
r'<source src="(https://embed\.koreus\.com/[0-9]+/[0-9]+/[a-z-]+\.mp4)" type="video/mp4"',
webpage, "download_url"
)
return {
'http_headers': {'Accept': 'video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5'},
'id': video_id,
'url': download_url,
'title': title
}