mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-22 16:44:32 +01:00
Koreus
Added extractor for koreus.com
This commit is contained in:
parent
00eb865b3c
commit
840f28213c
@ -511,6 +511,7 @@ from .kickstarter import KickStarterIE
|
|||||||
from .kinja import KinjaEmbedIE
|
from .kinja import KinjaEmbedIE
|
||||||
from .kinopoisk import KinoPoiskIE
|
from .kinopoisk import KinoPoiskIE
|
||||||
from .konserthusetplay import KonserthusetPlayIE
|
from .konserthusetplay import KonserthusetPlayIE
|
||||||
|
from .koreus import koreusIE
|
||||||
from .krasview import KrasViewIE
|
from .krasview import KrasViewIE
|
||||||
from .ku6 import Ku6IE
|
from .ku6 import Ku6IE
|
||||||
from .kusi import KUSIIE
|
from .kusi import KUSIIE
|
||||||
|
39
youtube_dl/extractor/koreus.py
Normal file
39
youtube_dl/extractor/koreus.py
Normal 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
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user