1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-12-02 05:07:55 +01:00

flake8 fixes

This commit is contained in:
Scott 2020-05-22 15:58:01 -04:00
parent 6c787d8f1e
commit 47f777b1c3

View File

@ -4,18 +4,13 @@ from __future__ import unicode_literals
import re import re
from .common import InfoExtractor from .common import InfoExtractor
from ..compat import compat_str
from ..utils import ( from ..utils import (
ExtractorError, ExtractorError,
determine_ext, determine_ext,
int_or_none, int_or_none,
float_or_none,
js_to_json, js_to_json,
orderedSet, orderedSet,
strip_jsonp,
strip_or_none,
unified_strdate, unified_strdate,
url_or_none,
US_RATINGS, US_RATINGS,
) )
@ -76,18 +71,15 @@ class PBSKIDSIE(InfoExtractor):
if episode_id: if episode_id:
webpage = self._download_webpage(url, episode_id) webpage = self._download_webpage(url, episode_id)
description = self._html_search_meta( description = self._html_search_meta(
'description', webpage, default=None) 'description', webpage, default=None)
upload_date = unified_strdate(self._search_regex( upload_date = unified_strdate(self._search_regex(
r'air_date"\:"([^"]+)"', r'air_date"\:"([^"]+)"',
webpage, 'upload date', default=None)) webpage, 'upload date', default=None))
# m3u8 url # m3u8 url
MULTI_PART_REGEXES = ( MULTI_PART_REGEXES = (
r'URI"\:"https?\:.?/.?/urs\.pbs\.org.?/redirect.?/([\d\w]+)', r'URI"\:"https?\:.?/.?/urs\.pbs\.org.?/redirect.?/([\d\w]+)',
) )
for p in MULTI_PART_REGEXES: for p in MULTI_PART_REGEXES:
tabbed_videos = orderedSet(re.findall(p, webpage)) tabbed_videos = orderedSet(re.findall(p, webpage))
if tabbed_videos: if tabbed_videos:
@ -231,5 +223,4 @@ class PBSKIDSIE(InfoExtractor):
'upload_date': upload_date, 'upload_date': upload_date,
'formats': formats, 'formats': formats,
'subtitles': subtitles, 'subtitles': subtitles,
#'chapters': chapters,
} }