mirror of
https://github.com/ytdl-org/youtube-dl
synced 2025-01-25 21:00:10 +09:00
code style fixes
This commit is contained in:
parent
8c5e9e0213
commit
7f0a28e925
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user