Rename files to conform to PEP8

This commit is contained in:
Serene-Arc
2021-02-07 11:09:31 +10:00
committed by Ali Parlakci
parent 12b5fd351e
commit be613949fe
17 changed files with 22 additions and 22 deletions

View File

@@ -0,0 +1,17 @@
import os
import pathlib
from bulkredditdownloader.downloaders.downloader_utils import getExtension, getFile
from bulkredditdownloader.utils import GLOBAL
class Direct:
def __init__(self, directory: pathlib.Path, post: dict):
post['EXTENSION'] = getExtension(post['CONTENTURL'])
if not os.path.exists(directory):
os.makedirs(directory)
filename = GLOBAL.config['filename'].format(**post) + post["EXTENSION"]
short_filename = post['POSTID'] + post['EXTENSION']
getFile(filename, short_filename, directory, post['CONTENTURL'])