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