mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-04 23:43:20 +00:00
PEP8 fixes
This commit is contained in:
parent
16e7711e22
commit
fa15607773
|
@ -27,7 +27,6 @@
|
||||||
compiled_regex_type,
|
compiled_regex_type,
|
||||||
ExtractorError,
|
ExtractorError,
|
||||||
float_or_none,
|
float_or_none,
|
||||||
HEADRequest,
|
|
||||||
int_or_none,
|
int_or_none,
|
||||||
RegexNotFoundError,
|
RegexNotFoundError,
|
||||||
sanitize_filename,
|
sanitize_filename,
|
||||||
|
@ -839,7 +838,7 @@ def _extract_m3u8_formats(self, m3u8_url, video_id, ext=None,
|
||||||
note='Downloading m3u8 information',
|
note='Downloading m3u8 information',
|
||||||
errnote='Failed to download m3u8 information')
|
errnote='Failed to download m3u8 information')
|
||||||
last_info = None
|
last_info = None
|
||||||
last_media= None
|
last_media = None
|
||||||
kv_rex = re.compile(
|
kv_rex = re.compile(
|
||||||
r'(?P<key>[a-zA-Z_-]+)=(?P<val>"[^"]+"|[^",]+)(?:,|$)')
|
r'(?P<key>[a-zA-Z_-]+)=(?P<val>"[^"]+"|[^",]+)(?:,|$)')
|
||||||
for line in m3u8_doc.splitlines():
|
for line in m3u8_doc.splitlines():
|
||||||
|
|
|
@ -348,6 +348,7 @@ def _real_extract(self, url):
|
||||||
'%s/api/channel/hls/%s.m3u8?%s'
|
'%s/api/channel/hls/%s.m3u8?%s'
|
||||||
% (self._USHER_BASE, channel_id, compat_urllib_parse.urlencode(query).encode('utf-8')),
|
% (self._USHER_BASE, channel_id, compat_urllib_parse.urlencode(query).encode('utf-8')),
|
||||||
channel_id, 'mp4')
|
channel_id, 'mp4')
|
||||||
|
|
||||||
# prefer the 'source' stream, the others are limited to 30 fps
|
# prefer the 'source' stream, the others are limited to 30 fps
|
||||||
def _sort_source(f):
|
def _sort_source(f):
|
||||||
if f.get('m3u8_media') is not None and f['m3u8_media'].get('NAME') == 'Source':
|
if f.get('m3u8_media') is not None and f['m3u8_media'].get('NAME') == 'Source':
|
||||||
|
|
|
@ -52,7 +52,7 @@ def _real_extract(self, url):
|
||||||
formats = []
|
formats = []
|
||||||
for v in switch.findall('./video'):
|
for v in switch.findall('./video'):
|
||||||
proto = v.attrib.get('proto')
|
proto = v.attrib.get('proto')
|
||||||
if not proto in ['http', 'rtmp']:
|
if proto not in ['http', 'rtmp']:
|
||||||
continue
|
continue
|
||||||
f = {
|
f = {
|
||||||
'width': int_or_none(v.attrib.get('width')),
|
'width': int_or_none(v.attrib.get('width')),
|
||||||
|
|
Loading…
Reference in a new issue