From fa156077737d5162795a221fe2995a276d31c6d3 Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Tue, 17 Feb 2015 21:46:20 +0100 Subject: [PATCH] PEP8 fixes --- youtube_dl/extractor/common.py | 3 +-- youtube_dl/extractor/twitch.py | 1 + youtube_dl/extractor/videolecturesnet.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py index 31599bf52..08b8ad37c 100644 --- a/youtube_dl/extractor/common.py +++ b/youtube_dl/extractor/common.py @@ -27,7 +27,6 @@ compiled_regex_type, ExtractorError, float_or_none, - HEADRequest, int_or_none, RegexNotFoundError, sanitize_filename, @@ -839,7 +838,7 @@ def _extract_m3u8_formats(self, m3u8_url, video_id, ext=None, note='Downloading m3u8 information', errnote='Failed to download m3u8 information') last_info = None - last_media= None + last_media = None kv_rex = re.compile( r'(?P[a-zA-Z_-]+)=(?P"[^"]+"|[^",]+)(?:,|$)') for line in m3u8_doc.splitlines(): diff --git a/youtube_dl/extractor/twitch.py b/youtube_dl/extractor/twitch.py index 8e296698e..4b0d8988d 100644 --- a/youtube_dl/extractor/twitch.py +++ b/youtube_dl/extractor/twitch.py @@ -348,6 +348,7 @@ def _real_extract(self, url): '%s/api/channel/hls/%s.m3u8?%s' % (self._USHER_BASE, channel_id, compat_urllib_parse.urlencode(query).encode('utf-8')), channel_id, 'mp4') + # prefer the 'source' stream, the others are limited to 30 fps def _sort_source(f): if f.get('m3u8_media') is not None and f['m3u8_media'].get('NAME') == 'Source': diff --git a/youtube_dl/extractor/videolecturesnet.py b/youtube_dl/extractor/videolecturesnet.py index d46234856..d6a7eb203 100644 --- a/youtube_dl/extractor/videolecturesnet.py +++ b/youtube_dl/extractor/videolecturesnet.py @@ -52,7 +52,7 @@ def _real_extract(self, url): formats = [] for v in switch.findall('./video'): proto = v.attrib.get('proto') - if not proto in ['http', 'rtmp']: + if proto not in ['http', 'rtmp']: continue f = { 'width': int_or_none(v.attrib.get('width')),