mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-22 16:44:32 +01:00
Flake 8 happy
This commit is contained in:
parent
7f84a8f13c
commit
3ceed8f635
@ -20,7 +20,6 @@ from __future__ import unicode_literals
|
|||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
|
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
unified_timestamp,
|
|
||||||
xpath_text,
|
xpath_text,
|
||||||
xpath_with_ns,
|
xpath_with_ns,
|
||||||
)
|
)
|
||||||
@ -28,6 +27,7 @@ from ..utils import (
|
|||||||
_s = lambda p: xpath_with_ns(p, {'svg': 'http://www.w3.org/2000/svg'})
|
_s = lambda p: xpath_with_ns(p, {'svg': 'http://www.w3.org/2000/svg'})
|
||||||
_x = lambda p: xpath_with_ns(p, {'xlink': 'http://www.w3.org/1999/xlink'})
|
_x = lambda p: xpath_with_ns(p, {'xlink': 'http://www.w3.org/1999/xlink'})
|
||||||
|
|
||||||
|
|
||||||
class BigBlueButtonIE(InfoExtractor):
|
class BigBlueButtonIE(InfoExtractor):
|
||||||
_VALID_URL = r'(?P<website>https?://[^/]+)/playback/presentation/2.0/playback.html\?meetingId=(?P<id>[0-9a-f\-]+)'
|
_VALID_URL = r'(?P<website>https?://[^/]+)/playback/presentation/2.0/playback.html\?meetingId=(?P<id>[0-9a-f\-]+)'
|
||||||
_TESTS = [
|
_TESTS = [
|
||||||
@ -65,7 +65,8 @@ class BigBlueButtonIE(InfoExtractor):
|
|||||||
m = self._VALID_URL_RE.match(url)
|
m = self._VALID_URL_RE.match(url)
|
||||||
website = m.group('website')
|
website = m.group('website')
|
||||||
|
|
||||||
webpage = self._download_webpage(url, video_id)
|
# We don't parse anything, but make sure it exists
|
||||||
|
self._download_webpage(url, video_id)
|
||||||
|
|
||||||
# Extract basic metadata (more available in metadata.xml)
|
# Extract basic metadata (more available in metadata.xml)
|
||||||
metadata_url = website + '/presentation/' + video_id + '/metadata.xml'
|
metadata_url = website + '/presentation/' + video_id + '/metadata.xml'
|
||||||
@ -86,7 +87,7 @@ class BigBlueButtonIE(InfoExtractor):
|
|||||||
'url': image.text.strip(),
|
'url': image.text.strip(),
|
||||||
'width': image.get('width'),
|
'width': image.get('width'),
|
||||||
'height': image.get('height')
|
'height': image.get('height')
|
||||||
}
|
}
|
||||||
|
|
||||||
# This code mostly useless unless one know how to process slides
|
# This code mostly useless unless one know how to process slides
|
||||||
shapes_url = website + '/presentation/' + video_id + '/shapes.svg'
|
shapes_url = website + '/presentation/' + video_id + '/shapes.svg'
|
||||||
@ -102,7 +103,10 @@ class BigBlueButtonIE(InfoExtractor):
|
|||||||
# for merging its video) - it lacks the slides, unfortunately
|
# for merging its video) - it lacks the slides, unfortunately
|
||||||
formats = []
|
formats = []
|
||||||
|
|
||||||
sources = { 'webcams': '/video/webcams.webm', 'deskshare': '/deskshare/deskshare.webm' }
|
sources = {
|
||||||
|
'webcams': '/video/webcams.webm',
|
||||||
|
'deskshare': '/deskshare/deskshare.webm'
|
||||||
|
}
|
||||||
for format_id, source in sources.items():
|
for format_id, source in sources.items():
|
||||||
video_url = website + '/presentation/' + video_id + source
|
video_url = website + '/presentation/' + video_id + source
|
||||||
formats.append({
|
formats.append({
|
||||||
@ -112,9 +116,8 @@ class BigBlueButtonIE(InfoExtractor):
|
|||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': id,
|
||||||
'title': title,
|
'title': title,
|
||||||
'formats': formats,
|
'formats': formats,
|
||||||
'timestamp': int(start_time),
|
'timestamp': int(start_time),
|
||||||
# 'thumbnails': thumbnails
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user