1
0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2025-02-06 10:09:50 +00:00

[IQM2] flake8 for PEP 8

This commit is contained in:
John Hawkinson 2017-03-07 23:50:34 -05:00
parent 9f11769f17
commit c764516144

View File

@ -9,6 +9,7 @@ from ..utils import js_to_json
# Contributed by John Hawkinson <jhawk@mit.edu>, 6 Oct 2016. # Contributed by John Hawkinson <jhawk@mit.edu>, 6 Oct 2016.
class IQM2IE(InfoExtractor): class IQM2IE(InfoExtractor):
IE_DESC = 'IQM2 (aka Accela) livestreamed video from municipal meetings' IE_DESC = 'IQM2 (aka Accela) livestreamed video from municipal meetings'
# We commonly see both iqm2.com and IQM2.com. # We commonly see both iqm2.com and IQM2.com.
@ -50,7 +51,7 @@ class IQM2IE(InfoExtractor):
{ {
'url': 'https://CambridgeMA.IQM2.com/Citizens/VideoMain.aspx?MeetingID=1594', 'url': 'https://CambridgeMA.IQM2.com/Citizens/VideoMain.aspx?MeetingID=1594',
'only_matching': True, 'only_matching': True,
} },
] ]
def _find_jwplayer_data(self, webpage): def _find_jwplayer_data(self, webpage):
@ -64,7 +65,7 @@ class IQM2IE(InfoExtractor):
transform_source=js_to_json) transform_source=js_to_json)
assert(isinstance(jwplayer_data, list)) assert(isinstance(jwplayer_data, list))
jwplayer_data = {'sources': jwplayer_data } jwplayer_data = {'sources': jwplayer_data}
jwplayer_data['tracks'] = jwplayer_data['sources'][0].get('tracks') jwplayer_data['tracks'] = jwplayer_data['sources'][0].get('tracks')
return self._parse_jwplayer_data( return self._parse_jwplayer_data(
@ -82,7 +83,7 @@ class IQM2IE(InfoExtractor):
# and then parse the canonicalized src element # and then parse the canonicalized src element
inner_url_rel = self._html_search_regex( inner_url_rel = self._html_search_regex(
r'<div id="VideoPanelInner".*src="([^"]+)"', r'<div id="VideoPanelInner".*src="([^"]+)"',
parent_page, 'url'); parent_page, 'url')
inner_url = compat_urlparse.urljoin(url, inner_url_rel) inner_url = compat_urlparse.urljoin(url, inner_url_rel)
mobj = re.match( mobj = re.match(