mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-01-07 17:16:08 +00:00
[learnr] Add new extractor(closes #4284)
This commit is contained in:
parent
2cbd8c6781
commit
a001296703
|
@ -370,6 +370,7 @@ from .kuwo import (
|
||||||
)
|
)
|
||||||
from .la7 import LA7IE
|
from .la7 import LA7IE
|
||||||
from .laola1tv import Laola1TvIE
|
from .laola1tv import Laola1TvIE
|
||||||
|
from .learnr import LearnrIE
|
||||||
from .lecture2go import Lecture2GoIE
|
from .lecture2go import Lecture2GoIE
|
||||||
from .lemonde import LemondeIE
|
from .lemonde import LemondeIE
|
||||||
from .leeco import (
|
from .leeco import (
|
||||||
|
|
33
youtube_dl/extractor/learnr.py
Normal file
33
youtube_dl/extractor/learnr.py
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
# coding: utf-8
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from .common import InfoExtractor
|
||||||
|
|
||||||
|
|
||||||
|
class LearnrIE(InfoExtractor):
|
||||||
|
_VALID_URL = r'https?://(?:www\.)?learnr\.pro/view/video/(?P<id>[0-9]+)'
|
||||||
|
_TEST = {
|
||||||
|
'url': 'http://www.learnr.pro/view/video/51624-web-development-tutorial-for-beginners-1-how-to-build-webpages-with-html-css-javascript',
|
||||||
|
'md5': '3719fdf0a68397f49899e82c308a89de',
|
||||||
|
'info_dict': {
|
||||||
|
'id': '51624',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'title': 'Web Development Tutorial for Beginners (#1) - How to build webpages with HTML, CSS, Javascript',
|
||||||
|
'description': 'md5:b36dbfa92350176cdf12b4d388485503',
|
||||||
|
'uploader': 'LearnCode.academy',
|
||||||
|
'uploader_id': 'learncodeacademy',
|
||||||
|
'upload_date': '20131021',
|
||||||
|
},
|
||||||
|
'add_ie': ['Youtube'],
|
||||||
|
}
|
||||||
|
|
||||||
|
def _real_extract(self, url):
|
||||||
|
video_id = self._match_id(url)
|
||||||
|
webpage = self._download_webpage(url, video_id)
|
||||||
|
|
||||||
|
return {
|
||||||
|
'_type': 'url_transparent',
|
||||||
|
'url': self._search_regex(
|
||||||
|
r"videoId\s*:\s*'([^']+)'", webpage, 'youtube id'),
|
||||||
|
'id': video_id,
|
||||||
|
}
|
Loading…
Reference in a new issue