diff options
author | Unknown <blackjack4494@web.de> | 2020-09-02 23:33:41 +0200 |
---|---|---|
committer | Unknown <blackjack4494@web.de> | 2020-09-02 23:33:41 +0200 |
commit | 3ca3f77f9ce9dd504dc6af4ef605c245c31ff860 (patch) | |
tree | 6bd9c9352327148a78b8c46227c8d526f1447b03 /youtube_dl/extractor/screencastomatic.py | |
parent | 4cd6add62b54721eeb3bf76bd9c0b4d676dc4d68 (diff) | |
download | hypervideo-pre-3ca3f77f9ce9dd504dc6af4ef605c245c31ff860.tar.lz hypervideo-pre-3ca3f77f9ce9dd504dc6af4ef605c245c31ff860.tar.xz hypervideo-pre-3ca3f77f9ce9dd504dc6af4ef605c245c31ff860.zip |
[skip travis] adding automerge support
basically copying content of youtube_dl folder to youtube_dlc and excluding the youtube_dl folder when compiling
Diffstat (limited to 'youtube_dl/extractor/screencastomatic.py')
-rw-r--r-- | youtube_dl/extractor/screencastomatic.py | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/youtube_dl/extractor/screencastomatic.py b/youtube_dl/extractor/screencastomatic.py new file mode 100644 index 000000000..b5e76c9af --- /dev/null +++ b/youtube_dl/extractor/screencastomatic.py @@ -0,0 +1,37 @@ +# coding: utf-8 +from __future__ import unicode_literals + +from .common import InfoExtractor +from ..utils import js_to_json + + +class ScreencastOMaticIE(InfoExtractor): + _VALID_URL = r'https?://screencast-o-matic\.com/watch/(?P<id>[0-9a-zA-Z]+)' + _TEST = { + 'url': 'http://screencast-o-matic.com/watch/c2lD3BeOPl', + 'md5': '483583cb80d92588f15ccbedd90f0c18', + 'info_dict': { + 'id': 'c2lD3BeOPl', + 'ext': 'mp4', + 'title': 'Welcome to 3-4 Philosophy @ DECV!', + 'thumbnail': r're:^https?://.*\.jpg$', + 'description': 'as the title says! also: some general info re 1) VCE philosophy and 2) distance learning.', + 'duration': 369.163, + } + } + + def _real_extract(self, url): + video_id = self._match_id(url) + webpage = self._download_webpage(url, video_id) + + jwplayer_data = self._parse_json( + self._search_regex( + r"(?s)jwplayer\('mp4Player'\).setup\((\{.*?\})\);", webpage, 'setup code'), + video_id, transform_source=js_to_json) + + info_dict = self._parse_jwplayer_data(jwplayer_data, video_id, require_title=False) + info_dict.update({ + 'title': self._og_search_title(webpage), + 'description': self._og_search_description(webpage), + }) + return info_dict |