mirror of https://github.com/blackjack4494/yt-dlc
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.3 KiB
Python
38 lines
1.3 KiB
Python
10 years ago
|
# coding: utf-8
|
||
|
from __future__ import unicode_literals
|
||
|
|
||
8 years ago
|
from .common import InfoExtractor
|
||
9 years ago
|
from ..utils import js_to_json
|
||
10 years ago
|
|
||
|
|
||
8 years ago
|
class ScreencastOMaticIE(InfoExtractor):
|
||
10 years ago
|
_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!',
|
||
8 years ago
|
'thumbnail': r're:^https?://.*\.jpg$',
|
||
10 years ago
|
'description': 'as the title says! also: some general info re 1) VCE philosophy and 2) distance learning.',
|
||
9 years ago
|
'duration': 369.163,
|
||
10 years ago
|
}
|
||
|
}
|
||
|
|
||
|
def _real_extract(self, url):
|
||
|
video_id = self._match_id(url)
|
||
|
webpage = self._download_webpage(url, video_id)
|
||
|
|
||
9 years ago
|
jwplayer_data = self._parse_json(
|
||
|
self._search_regex(
|
||
|
r"(?s)jwplayer\('mp4Player'\).setup\((\{.*?\})\);", webpage, 'setup code'),
|
||
|
video_id, transform_source=js_to_json)
|
||
10 years ago
|
|
||
9 years ago
|
info_dict = self._parse_jwplayer_data(jwplayer_data, video_id, require_title=False)
|
||
|
info_dict.update({
|
||
10 years ago
|
'title': self._og_search_title(webpage),
|
||
|
'description': self._og_search_description(webpage),
|
||
9 years ago
|
})
|
||
|
return info_dict
|