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