code style fixes

This commit is contained in:
Chris Putnam 2021-01-22 00:54:47 -06:00
parent 8c5e9e0213
commit 7f0a28e925

View File

@ -16,6 +16,7 @@ from ..utils import (
import json import json
import re import re
class PatreonIE(InfoExtractor): class PatreonIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?patreon\.com/(?:creation\?hid=|posts/(?:[\w-]+-)?)(?P<id>\d+)' _VALID_URL = r'https?://(?:www\.)?patreon\.com/(?:creation\?hid=|posts/(?:[\w-]+-)?)(?P<id>\d+)'
_TESTS = [{ _TESTS = [{
@ -150,16 +151,16 @@ class PatreonIE(InfoExtractor):
if not info.get('url'): if not info.get('url'):
post_file = attributes['post_file'] post_file = attributes['post_file']
if post_file.get('name') == 'video': if post_file.get('name') == 'video':
# single video embed # single video embed
info.update({ info.update({
'url': post_file['url'] 'url': post_file['url']
}) })
else: else:
# video is attached as a file # video is attached as a file
ext = determine_ext(post_file.get('name')) ext = determine_ext(post_file.get('name'))
if ext in KNOWN_EXTENSIONS: if ext in KNOWN_EXTENSIONS:
info.update({ info.update({
'ext': ext, 'ext': ext,
'url': post_file['url'], 'url': post_file['url'],
}) })
return info return info