From 3ceed8f6351b0b89aae511fdde828f7f56d9657e Mon Sep 17 00:00:00 2001 From: Olivier Berger Date: Fri, 1 May 2020 22:57:30 +0200 Subject: [PATCH] Flake 8 happy --- youtube_dl/extractor/bbb.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/youtube_dl/extractor/bbb.py b/youtube_dl/extractor/bbb.py index c124add71..3e918c9be 100644 --- a/youtube_dl/extractor/bbb.py +++ b/youtube_dl/extractor/bbb.py @@ -20,7 +20,6 @@ from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( - unified_timestamp, xpath_text, xpath_with_ns, ) @@ -28,6 +27,7 @@ from ..utils import ( _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'}) + class BigBlueButtonIE(InfoExtractor): _VALID_URL = r'(?Phttps?://[^/]+)/playback/presentation/2.0/playback.html\?meetingId=(?P[0-9a-f\-]+)' _TESTS = [ @@ -65,7 +65,8 @@ class BigBlueButtonIE(InfoExtractor): m = self._VALID_URL_RE.match(url) 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) metadata_url = website + '/presentation/' + video_id + '/metadata.xml' @@ -86,7 +87,7 @@ class BigBlueButtonIE(InfoExtractor): 'url': image.text.strip(), 'width': image.get('width'), 'height': image.get('height') - } + } # This code mostly useless unless one know how to process slides shapes_url = website + '/presentation/' + video_id + '/shapes.svg' @@ -102,7 +103,10 @@ class BigBlueButtonIE(InfoExtractor): # for merging its video) - it lacks the slides, unfortunately 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(): video_url = website + '/presentation/' + video_id + source formats.append({ @@ -112,9 +116,8 @@ class BigBlueButtonIE(InfoExtractor): self._sort_formats(formats) return { - 'id': video_id, + 'id': id, 'title': title, 'formats': formats, 'timestamp': int(start_time), -# 'thumbnails': thumbnails }