[brightcove:new] flake8 for PEP 8
I really reget not being able to use this compact syntax, as well as to align with spaces: if not account_id: account_id = attrs.get('data-account') if not player_id: player_id = attrs.get('data-player') if not embed: embed = attrs.get('data-embed') but it really upsets flake8: brightcove.py:519:30: E701 multiple statements on one line (colon) brightcove.py:519:42: E221 multiple spaces before operator brightcove.py:520:29: E701 multiple statements on one line (colon) brightcove.py:520:30: E241 multiple spaces after ':' brightcove.py:520:41: E221 multiple spaces before operator brightcove.py:521:25: E701 multiple statements on one line (colon) brightcove.py:521:26: E241 multiple spaces after ':' brightcove.py:521:37: E221 multiple spaces before operator
This commit is contained in:
parent
99474c6510
commit
63108b8835
@ -506,7 +506,8 @@ class BrightcoveNewIE(InfoExtractor):
|
|||||||
(\d+)/([^/]+)_([^/]+)/index(?:\.min)?\.js
|
(\d+)/([^/]+)_([^/]+)/index(?:\.min)?\.js
|
||||||
)
|
)
|
||||||
)?
|
)?
|
||||||
''', webpage):
|
''', webpage
|
||||||
|
):
|
||||||
attrs = extract_attributes(video)
|
attrs = extract_attributes(video)
|
||||||
|
|
||||||
# According to examples from [4] it's unclear whether video id
|
# According to examples from [4] it's unclear whether video id
|
||||||
@ -514,12 +515,16 @@ class BrightcoveNewIE(InfoExtractor):
|
|||||||
video_id = attrs.get('data-video-id')
|
video_id = attrs.get('data-video-id')
|
||||||
# See PR#12099/bostonglobe.py for 'data-brightcove-video-id' variant
|
# See PR#12099/bostonglobe.py for 'data-brightcove-video-id' variant
|
||||||
|
|
||||||
if not account_id: account_id = attrs.get('data-account')
|
if not account_id:
|
||||||
if not player_id: player_id = attrs.get('data-player')
|
account_id = attrs.get('data-account')
|
||||||
if not embed: embed = attrs.get('data-embed')
|
if not player_id:
|
||||||
|
player_id = attrs.get('data-player')
|
||||||
|
if not embed:
|
||||||
|
embed = attrs.get('data-embed')
|
||||||
|
|
||||||
# According to [5] data-video-id may be prefixed with 'ref:'
|
# According to [5] data-video-id may be prefixed with 'ref:'
|
||||||
if video_id: video_id = video_id.rpartition('ref:')[2]
|
if video_id:
|
||||||
|
video_id = video_id.rpartition('ref:')[2]
|
||||||
|
|
||||||
if video_id and account_id and player_id and embed:
|
if video_id and account_id and player_id and embed:
|
||||||
entries.append(
|
entries.append(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user